PDA

View Full Version : [CSS] Centered Link List with block anchor rollovers?



senocular
April 8th, 2005, 11:50 AM
ok, heres my problem. I need a menu of links at the top of a page, horizontally centered, with text labels and anchor-based rollovers (changing background and border color).

What I can do:
- centered with inline elements using text-align (fails because IE doesnt render padding/border correctly with inline anchor tags inline)
- left justified links with block anchors and correct rollover (by floating LI's left).

What I cannot do:
- center a horizontal list of block A tags


The text links themselves are all variable so no real widths are known. Each links should be relative size to the text it contains. Margin auto isn't going to work since, again, no width is known. Here, again, it seems like tables are the way to go... and I'll do that unless someone tells me the way to do it without them ;)

senocular
April 8th, 2005, 12:19 PM
ok, I found that IE will play nice with inline padding/borders if there is other content inside the containing block of the UL (above and below). Weird POS.

Ectheo
April 8th, 2005, 01:02 PM
yeah, IE really screws up everything. Curse you Microsoft and your non-standards compliant browser!!