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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T16:07:44+00:00 2026-06-17T16:07:44+00:00

My goal is to make my #header div centered. It contains buttons to navigate

  • 0

My goal is to make my #header div centered. It contains buttons to navigate to different pages. I tried using the <div align=center> tag but it just won’t work. I just want it to be in the center like everything else on my page.

Here is my code:

<style>
 #header ul {
margin: 0px;
padding: 0px;
list-style-type: none;
}
 #header ul li {
position:relative;
float:left;

}
 #header ul li ul li a {
font-size: 12px;
}
 #header ul li a {
display: block;
height: 35px;
width: 90px;
color: #666;
text-decoration: none;
font-family: Verdana, Geneva, sans-serif;
line-height: 35px;
text-align: center;
}
   #header ul li ul {
position: absolute;
top: 31px;
visibility: hidden;
}
    #header ul li a:hover {
color: #333;
font-weight: bold;
}
    #header ul li:hover ul {
visibility: visible;
}
#header {
width:100%;
margin: 0px auto 0px auto;
text-align:left;

}

 body {
padding-left:40px;
padding-right:40px;
text-align: center;
}
 </style>
 </head>

<body  bgcolor="#E6F7F4">
 <center>
   <p><img src="othlogo.gif"/><br />
   </p>
 <div id="header" align="right" >
  <ul>
<li><a href"blog.html">Blog</a>
   </li>
  </ul>
  <ul>
<li><a href"blog.html">More</a>
<ul>
<li><a href="more.html">Education</a></li>
<li><a href="more.html">Domestic</a></li>
    </ul>
   </li>
  </ul>
  <ul>
<li><a href"blog.html">Option3</a>
<ul>
<li><a href="more.html">Psychology</a></li>
<li><a href="more.html">Map</a></li>

    </ul>
   </li>
  </ul>
  <ul>
<li><a href"blog.html">About</a>
   </li>
  </ul>
</div>
  • 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-06-17T16:07:45+00:00Added an answer on June 17, 2026 at 4:07 pm

    You can use margin: auto to center #header as long as it has a width set on it.

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

Sidebar

Related Questions

Goal is to make a dialog that appears on menu_key pressed, but it keeps
My goal is to make a layout that is 200% width and height, with
My goal here is to make a button. I want the text to sit
I'm re-writing alibrary with a mandate to make it totally allocation free. The goal
My goal is to implement the following scheme using the subdomain and path as
Goal: Need to make selection of a single row included button in the listview.
My goal is to make a floating toolbar (as its own C# application), and
My goal is to make web applications! I finished reading the Books Headfirst -
My goal is to make a simple TCP proxy application for my test lab.
My end goal is to make node.js more cost effective per each server instance.

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.