At 12:47 AM 2/20/2006, Tyson Tate wrote:
>I'm trying to create a centered menu using a ul that looks like so:
>
>http://ohgoditburns.net/wp-content/uploads/2006/02/desired_menu.gif
>
>The links are regular and don't use image replacement.
>
>Can anyone suggest a list menu technique that allows for centering?


You've already received one reply which suggests inlining your 
links.  That method will work, but will cause only the actual link 
text to be clickable.  To do this with block links, so the entire 
width and height of each link can be clicked, you can float your 
links and list items.  Set the UL width to the sum of the combined LI 
widths (accounting for margins, padding and borders, as necessary), 
and then set the left and right margins on the UL to auto.  Depending 
on how you set the units on everything, you may not be able to center 
*exactly* using this method, but with judicious tweaking you can get 
close enough so nobody will know the difference.  (If you need to 
support IE/Win 5.5 and older, you need to set text-align: center; on 
the parent element of your list in order to get the proper 
centering.  Don't forget the reset the text-align value for child 
elements that need a different value.)

HTH,


-Adam Kuehn 

______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
IE7b2 testing hub -- http://css-discuss.incutio.com/?page=IE7
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to