Hope I spelled the title correctly
So I have this menu:
And I gave the links a height, but I want them to be centered vertically (NOT text-align: center), without padding or margin.Code:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Meniu vertical (simplu)</title> <style> ul.meniu{ list-style: none; padding: 0px; margin: 0px; font-family: Verdana; font-size: 12px; width: 90px;} ul.meniu li a{ text-decoration: none; display: block; height: 20px; color: #3b73b3; background: #CEDAE9; valign: center;} ul.meniu li a:hover{ color: #FFFFFF; background: #2876c9;} ul.meniu li a:active{ color: #FFFFFF; background: #1F5C9C;} </style> </head> <body> <ul class="meniu"> <li><a href="#">Acasa</a></li> <li><a href="#">Despre</a></li> <li><a href="#">Suport</a></li> <li><a href="#">Contact</a></li> </ul> </body> </html>
Thanks!




Reply With Quote

Bookmarks