I have a div that contains a list which I am using as a menu. I need to have the text vertically centered within the list. I have tried lost of things to center the text vertically without success. How can I fix my problem? Here is the html and css:
HTML Code:<div id="leftMenu"> <ul> <li class="menuTop"><a href="#" onClick="_OLEShowPDP_; return false;">My PDP</a></li> <li class="menuMiddle"><a href="#" onClick="_OLEShowTraining_; return false;">My Training</a></li> <li class="menuMiddle"><a href="#" onClick="_OLEShowRecords_; return false;">My History</a></li> <li class="menuBottom"><a href="#" onClick="_OLEShowProfile_; return false;">My Profile</a></li> </ul> </div>Thanks in advance for any help. If you need any additional info, let me know and I will post more info.HTML Code:#leftMenu { position: relative; float: left; width: 160px; background-color:#00FF00; text-indent: 12px; } #leftMenu a { color: #ffffff; font-family: Tahoma, Arial, Helvetica; font-weight: bold; text-decoration: none; } #leftMenu a:hover { text-decoration: underline; } #leftMenu ul { margin: 0; padding: 0; list-style: none; } #leftMenu li { margin: 0; padding: 0; } .menuTop { background-image: url(images/mypdp.gif); background-repeat: no-repeat; background-position: left top; height: 31px; text-align: left; } .menuTop:hover { background-image: url(images/mypdp.gif); background-position: -160px; } .menuMiddle { background-image: url(images/myhistory.gif); background-repeat: no-repeat; background-position: left top; height: 31px; } .menuMiddle:hover { background-image:url(images/myhistory.gif); background-position: -160px; } .menuBottom { background-image: url(images/myprofile.gif); background-repeat: no-repeat; background-position: left top; height: 34px; } .menuBottom:hover { background-image: url(images/myprofile.gif); background-position: -160px; }








Bookmarks