Centering a menu in a div

Discussion in 'ASP .Net' started by Uriah Piddle, Feb 18, 2007.

  1. Uriah Piddle

    Uriah Piddle Guest

    Hi Gang,

    I have a horizontal asp menu in a div. I centered the menu by setting the
    text-align prop of the div to 'center' and that works in IE. But with the
    other browsers, the menu aligns left. I tried fiddling around with padding
    but that does not work because items are added to the menu at runntime and I
    can never know the width of the menu.

    Thanks for any ideas.

    Steve
    Uriah Piddle, Feb 18, 2007
    #1
    1. Advertising

  2. Take a look at this posting of mine and see if it helps you work a solution.

    http://www.velocityreviews.com/forums/t293486-centering-label-text.html

    Regards

    John Timney (MVP)
    http://www.johntimney.com
    http://www.johntimney.com/blog



    "Uriah Piddle" <> wrote in message
    news:%...
    > Hi Gang,
    >
    > I have a horizontal asp menu in a div. I centered the menu by setting the
    > text-align prop of the div to 'center' and that works in IE. But with the
    > other browsers, the menu aligns left. I tried fiddling around with padding
    > but that does not work because items are added to the menu at runntime and
    > I can never know the width of the menu.
    >
    > Thanks for any ideas.
    >
    > Steve
    >
    John Timney \(MVP\), Feb 18, 2007
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. David Graham

    Re: centering a div

    David Graham, Jul 6, 2003, in forum: HTML
    Replies:
    0
    Views:
    428
    David Graham
    Jul 6, 2003
  2. shank

    centering <div> in <TD>

    shank, Sep 30, 2003, in forum: HTML
    Replies:
    3
    Views:
    14,641
    Zibanani Jopi
    Jul 27, 2012
  3. King of Red Lions

    centering a div

    King of Red Lions, Jun 25, 2004, in forum: HTML
    Replies:
    1
    Views:
    391
  4. Luigi Donatello Asero
    Replies:
    4
    Views:
    2,072
    Luigi Donatello Asero
    May 22, 2006
  5. Steve Richter

    centering div within a div

    Steve Richter, Jul 16, 2007, in forum: ASP .Net
    Replies:
    4
    Views:
    477
    Brandon Gano
    Jul 17, 2007
Loading...

Share This Page