Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Centering a menu in a div

Reply
Thread Tools

Centering a menu in a div

 
 
Uriah Piddle
Guest
Posts: n/a
 
      02-18-2007
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


 
Reply With Quote
 
 
 
 
John Timney \(MVP\)
Guest
Posts: n/a
 
      02-18-2007
Take a look at this posting of mine and see if it helps you work a solution.

http://www.velocityreviews.com/forum...abel-text.html

Regards

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



"Uriah Piddle" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> 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
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
<div ... /> and <div ...></div> K Viltersten ASP .Net 4 03-31-2009 07:33 PM
centering div within a div Steve Richter ASP .Net 4 07-16-2007 11:27 PM
<div class="section" id="menu"> or <div class="subsection" id="menu"> Luigi Donatello Asero HTML 4 05-22-2006 05:26 PM
NS/FF don't change div offsetWidth when div innerHTML is added toand div becomes wider mscir Javascript 3 06-26-2005 04:04 PM
Q: Div A inside Div B is larger than Div B Dwayne Madsen Javascript 1 06-01-2005 03:02 PM



Advertisments