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 3220990
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T15:49:29+00:00 2026-05-17T15:49:29+00:00

I am working on a template for a new website. I am having some

  • 0

I am working on a template for a new website. I am having some trouble trying to get some containers to line up how I would like. I am trying to create a navigation bar out of several div’s and then underneath this block have a body that contains several containers.

I am stuck at 1) making the nav bar automagically align into the middle and 2) make the body start under the nav bar.

 <div id="navBar">
<div class = "buttons" id="home">Home</div>
<div class = "buttons" id="calendar">Calendar</div>
<div class = "buttons" id="gallery">Gallery</div>
<div class = "buttons" id="current">Dragon Rydas</div>
<div class = "buttons" id="prospective">Future Rydas</div>
<div class = "buttons" id="fallen">Fallen Rydas</div>
<div class = "buttons" id="contact">Contact</div>
<div class = "buttons" id="affiliates" align="center">Affiliates</div>
</div>


<div id="body">
<div class="content" id="Home">A</div>
<div class="content" id="CRydas">B</div>
<div class="content" id="Contact">C</div>
</div>

and the relevant css I have for it is:

#navBar {
    float:left;
    width:auto;
    margin-left:auto;
    margin-right:auto;
    color: #09F;
    size: 18px;
    font-size: 18px;
    font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
    right: auto;
    left: auto;
}

.buttons {
    float: left;
    padding: 5px;
    width:115px;
    margin-left:auto;
    margin-right:auto;
    text-align:center;
    font-size:18px;
    color: #0CF;
    font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;  
}

Thanks for any help.

  • 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-17T15:49:30+00:00Added an answer on May 17, 2026 at 3:49 pm

    Don’t use DIVs for menus, use lists. This gives you simple semantic HTML without all the need for additional IDs and classes.

    <div class='root'>
        <div class='menu'>
           <ul>
              <li><a href="...">Item</a></li>
          </ul>
        </div>
        ... your content ...
    </div>
    

    Then float your LIs

    .menu li {
      float:left
    }
    

    and style the anchors:

    .menu a {
       display:block;
       ... your styles ...
    }
    

    Then center the whole thing using a wrapper, “root” in this case:

    .root {
        width:960px;
        margin-left:auto;
        margin-right:auto;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm testing the new template for a website that I'm working for, and on
Rather new to trying to get OpenGL ES working on the iPhone, but I've
I am working on e-mail template. Code is something like this : <table width=702
i have one website which is working on templates. in the template there is
Im trying to implement some code i found on a website which duplicates a
I'm working on a WordPress template and need to add a hyperlink to the
Working with dates in ruby and rails on windows, I'm having problems with pre-epoch
Working with python interactively, it's sometimes necessary to display a result which is some
Working with TCL and I'd like to implement something like the Strategy Pattern .
I am working on a website at the moment which is displaying a strange

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.