Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3663784
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T01:34:12+00:00 2026-05-19T01:34:12+00:00

I am trying to create a navigation menu similar to that of Stack Overflow

  • 0

I am trying to create a navigation menu similar to that of Stack Overflow (Questions, Tags, Users, Badges, Unanswered, Ask Question).

I tried doing it by having a logo, 5 menu options. These were being placed on top of the container. I can’t align them.

How can I create it so that they are aligned?

HTML:

  <body>
  <div id="logoimg">
   <a href="http://www.domain.com">
   <img src="http://www.domain.com/domain.png" border="0"></img>
   </a>
  </div>
  <div id="navi">
 <a href="http://www.domain.com/home.php">Home</a>
 <a href="http://www.domain.com/profile.php">Profile</a>
 <a href="http://www.domain.com/settings.php">Settings</a>
 <a href="http://www.domain.com/logout.php">Logout</a>
 </div>
  <div id="my">
  <div id="box">
 <div id="pic">
 <div id="myname">
  <?php echo "$angelinajolie";?>
  </div>
  </div>
   </div>

</body>

CSS:

  div#logimg {
  margin-left: 213px;
  }

  #box {
 background-color: #FFFFFF;
 margin:0 auto; 
 height: 300px;
 width:830px;
 border:1px solid #E2E2E2;
  }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T01:34:12+00:00Added an answer on May 19, 2026 at 1:34 am

    Give this a shot:

    HTML:

    <div id="header">
        <h1><a href="http://www.domain.com">Name of Site</a></h1>
        <ul class="nav">
            <li><a href="http://www.domain.com/home.php">Home</a></li>
            <li><a href="http://www.domain.com/profile.php">Profile</a></li>
            <li><a href="http://www.domain.com/settings.php">Settings</a></li>
            <li><a href="http://www.domain.com/logout.php">Logout</a></li>
        </ul>
        <ul class="nav extra">
            <li><a href="http://www.domain.com/logout.php">Ask a Question</a></li>
        </ul>
    </div>
    

    Wrap the whole thing in a container div. The logo of the site should probably be an h1 with the title of the site in text (to be friendly to screen readers and the like). The list of links should be unordered lists. That structure will keep things nicely contained and CSS can do the rest.

    CSS:

    #header h1{
        float: left;
        width: 100px;
        height: 50px;
    }
    

    Float the site title/logo and give it a width and height.

    #header h1 a{
        background-image: url(http://www.domain.com/domain.png);
        display: block;
        text-indent: -9999px;
        overflow: hidden;
        width: 100px;
        height: 50px;
    }
    

    Place your logo as a background image on the anchor tag, make the anchor tag a block-level element, hide the text with a text-indent property combined with an overflow of hidden (this shoves the text way to the left).

    #header a{ text-decoration: none; }
    
    #header .nav li{
        background: #eee;
        border:1px solid #E2E2E2;
        float:left;
        margin-right: 0.5em;
        padding: 0.2em 0.5em;
    }
    

    Float the list elements in the ul tags and give them some styling.

    #header .extra{
        float: right;
        margin-right: 0;
        top: 0;
        right: 0;
    }
    

    Float the ‘extra’ nav over to the right rather than the left.

    See it in action here: http://jsfiddle.net/6F5ky/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to create a two-level horizontal navigation menu (or menubar) that displays the
I am trying to figure out the best way to create a navigation menu
I am trying to create to a vertical navigation menu using CSS sprites. I
In Silverlight 3, I am trying to create a pop up menu for navigation.
I am trying to create a dynamic menu with simple navigation. The problem is
I'm trying to create a sidebar navigation menu where when you hover over the
I am trying to create a menu navigation sort of like tab's but with
I have a navigation menu provider that I am trying to move over to
I'm trying to create a page with a navigation bar that has dropdown submenus.
I am looking to create a navigation or menu bar similar to the functionality

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.