PDA

View Full Version : html help needed: css menu - how to align left when page centered in browser?



steve_w
01-26-2006, 12:30 AM
I have just centered one of my pages in the browser window using the following div:

body
{
text-align: center;
}
div#container
{
margin-left: auto;
margin-right: auto;
width: 50em;
text-align: left;
}

But the text-align part creates a problem with my drop-down menus: they also align left. Of course, without this command, the page won't center. Can anyone supply a piece of html or script to override the css body command that I can implement on to the page? I am learning html on the hoof and this one really has me stumped. I know there is a fix, but I just can't figure it out. Help!

steve_w
01-26-2006, 10:42 AM
Sorry, I meant to say the drop-downs align center when the page is centered in the browser. This is quite an ugly effect - all I want the drop-downs to do is stay aligned to the left. I know it is possible and am sure there is a simple fix out there.

navaldesign
01-26-2006, 11:49 AM
Sorry, I meant to say the drop-downs align center when the page is centered in the browser. This is quite an ugly effect - all I want the drop-downs to do is stay aligned to the left. I know it is possible and am sure there is a simple fix out there.

I'm not sure i understand completely your question. Did you add this piece of code manually? If you use the built in BV feature for centering the page, drop down menus stay aligned left, they don't center. Do you mean something like this ?

http://www.navaldesign.info/bird/centeredpage.html ?

steve_w
02-06-2006, 04:52 PM
Yes, your website does exactly what I want mine to do. In answer to your question, I don't use Blue Voda; I use html 4.01 (I find BV useful for planning pages and for use as a graphics editor). I will take a look at the source code of your homepage and see if I can figure it out from there. Many thanks for your help Naval Design.