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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T16:25:10+00:00 2026-05-24T16:25:10+00:00

I can’t get my menu and logo centered. Here is the page URL: http://weebuild1.yolasite.com/

  • 0

I can’t get my menu and logo centered. Here is the page URL: http://weebuild1.yolasite.com/

As you can see, the logo and menu aren’t centered. They are all the way to the right. I tried putting margins and stuff and it will not center.

Menu / Logo CSS:

#header2 h1 { /*Logo*/
  display:block;
  float:left;
  width:320px;
  height:125px;
  background:url('resources/images/logo.jpg') no-repeat 0 0;
  text-indent:-10000px;
}
/*#header2 h1 a:hover {
  background:url('resources/images/logo.jpg') no-repeat 0 -125px;
}*/
#header2 h1 span.bg_fade { /*Logo hover*/
   position: absolute;
   top: 0;
   left: 0;
   height: 125px;
   width: 320px;
   background:url('resources/images/logo.jpg') no-repeat 0 -125px;
}
#header2 ul { /*Menu*/
  display:block;
  float:right;
  width:640px;
  height:125px;
  background:url('resources/images/menu.jpg') no-repeat 0 0;
  list-style:none;
}
#header2 ul li { /*Menu part*/
  display:block;
  float:left;
  height:125px;
  text-indent:-10000px;
}
#logo-nav {
  margin-right:10px;
}
#home {
  width:160px;
}
#about {
  width:137px;
}
#work {
  width:129px;
}
#contact {
  width:210px;
}
#header2 ul li a {
  display:block;
  width:100%;
  height:100%;
  outline: 0 !important;
  -moz-outline-style: 0 !important;
  -webkit-outline: 0 !important;
  -webkit-outline-style: 0 !important;
}
#home a:hover {
  background:url('resources/images/menu.jpg') no-repeat 0 -125px;
}
#about a:hover {
  background:url('resources/images/menu.jpg') no-repeat -160px -125px;
}
#work a:hover {
  background:url('resources/images/menu.jpg') no-repeat -297px -125px;
}
#contact a:hover {
  background:url('resources/images/menu.jpg') no-repeat -426px -125px;
}

Menu / Logo HTML:

<div id="header2" style="height:465px;">
    <div id="logo-nav" style="float:left;margin:0;">
      <h1><a href="index.php">WeeBuild Web Design</a></h1>

    <ul id="nav">

      <li id="home"><a href="index.php" title="Click here to go to our homepage.">Home</a></li>

      <li id="about"><a href="about.php" title="Learn more about us.">About</a></li>

      <li id="work"><a href="work.php" title="Check out some of the work we've done.">Work</a></li>

      <li id="contact"><a href="contact.php" title="Any questions? Click here to contact us.">Contact</a></li>

   </ul>
    </div>

Any ideas on how to get it to center?

  • 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-24T16:25:10+00:00Added an answer on May 24, 2026 at 4:25 pm

    It’s not actually the header that is scewed… Theres a few elements that mess up the layout

    First in the html theres a style tag on the div with the id #logo-nav.

    Looks like this:

    style="float:left;margin:0;"
    

    Should be this:

    style="margin:0 auto;"
    

    That will perfectly center the logo and menu. The menu pushes against the far right side of the container on that page and the logo to the left.

    Then in the CSS for the footer theres this class

    #footer {
      clear:both;
      width:955px;
      border-top:1px dashed #094e64;
    }
    

    Should be

    #footer {
      clear:both;
      border-top:1px dashed #094e64;
    }
    

    It now correctly takes up 100% of its parent container.

    Then back to the html, wrap #boxContainer, #leftCol and #newsletter in a div.

    Give that div a fixed width, matching exactly the horizontal space of the wrapped elements.

    Put margin: 0 auto; as a style on that div.

    Everything should be centered now.

    As a tip: the reason it got scewed because you use too much markup for some stuff on the page (you have like a bazillion wrappers/containers) and too little for other layout stuff (the actual content div doesn’t contain any other grouping divs, you put spacing inbetween elements using brs)

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

Sidebar

Related Questions

Can someone explain the usage of the dollar sign here.. var updateProgressDiv = $get('updateProgressDiv');
Can I get a 'when to use' for these and others? <% %> <%#
Can anybody shed some light on getDay() in Javascript please. Here datepicker is textbox
Can I register a .Net COM class with the SingleUse -flag? The reason I
Can i get the source code for a WAMP stack installer somewhere? Any help
Can we put functions to determine the condition for our list comprehensions. Here is
Can't seem to get the Back Button to appear in a UINavigationController flow. I
Can someone tell me the regex to see if something is surrounded in double
Can somebody point me to a resource that explains how to go about having
Can anyone (maybe an XSL-fan?) help me find any advantages with handling presentation of

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.