Centering a Jump Menu ?

Jim Newitt

New Member
Help!

I have created a 'Jump Menu' to serve as the navigation for my website.
However, I cannot seem to center it on my page?!

Does the Jump Menu need to be contained within a div tag, in order for me position it precisely? At the moment it is contained within a 'Form' (I think), and not a div tag.

I have attached a relevant screengrab.

When I do try and center a div, I set the margins to auto in the CSS correct? e.g margin: 0 auto;

This does not always seem to work, am I doing something wrong? Sorry, I am very new to this.

Many thanks in advance,

J
 

Attachments

  • Screen shot 2011-03-27 at 12.18.42.jpg
    Screen shot 2011-03-27 at 12.18.42.jpg
    18.7 KB · Views: 78

DHDdirect

New Member
Can't really see anything on the screen shot but what you described should work to center the menu. There must be something else pushing it over.

Try playing around with a couple empty divs, one inside the other with background colors set and some height and width so you can see each one. Once you get the one inside to center throw your menu in there and see if it remains centered. That way you'll know if the problem is within the menu our something around it.

Hope that helps.
 

bcee

New Member
Quick fix:

HTML:
Code:
<div id="tag for jump menu">
<ul>
<li>Your list items</li>
</ul>
</div>

CSS:
Code:
#tag for jump menu {
text-align: center;
}
#tag for jump menu ul {
margin: 0 auto;
text-align: left;
}
 
Top