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

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • steve_w
    Sergeant

    • Sep 2005
    • 20

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

    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
    Sergeant

    • Sep 2005
    • 20

    #2
    Re: html help needed: css menu - how to align left when page centered in browser?

    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.

    Comment

    • navaldesign
      General & Forum Moderator

      • Oct 2005
      • 12080

      #3
      Re: html help needed: css menu - how to align left when page centered in browser?

      Originally posted by steve_w
      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 ?
      Navaldesign
      Logger Lite: Low Cost, Customizable, multifeatured Login script
      Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
      DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
      Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

      Comment

      • steve_w
        Sergeant

        • Sep 2005
        • 20

        #4
        Re: html help needed: css menu - how to align left when page centered in browser?

        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.

        Comment

        Working...
        X