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!
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!
Comment