« Back to the CSS article: Pure CSS Horizontally Centered Drop-Down Menus by Matthew James Taylor
This menu is centered using my horizontally centered menus technique but with a slight midification. I have fliped the left-right positions and floating direction of the ul's and li's so the invisible ul overhangs the left side of the page instead of the right. This allows me to remove the overflow:hidden; rule - this makes the sub menus appear.
There is never any need for CSS hacks. This centered menu is uses hack-free CSS and is 100% valid.
The HTML in these centered menus validates as XHTML 1.0 strict.
These centered tabs are fully compatible with resizable text. Resizable text is important for web accessibility. People who are vision impaired can make the text larger so it's easier for them to read. It is becoming increasingly more important to make your website resizable text compatible because people are expecting higher levels of web accessibility.
The horizontally centered drop-down menus has been tested on the following browsers.