drayarms Posted May 4, 2012 Share Posted May 4, 2012 Hello, I'm trying to create a drop down menu. I'm just going to paste the relevant html and css below. What do I have to do to make sure that the <li> items in question, get the height that I want to specify? I have tried using css height: and line-height: to no avail. The <li> items don't get any higher than the length of the text enclosed within them. html <ul id = "pic_options_panel"> <li class = "comment_color pic_options">Picture Options <ul id = "pic_options_div"> <li id = "pic_options_collapse"> collapse </li> <li align = "center">Make Main Picture</li> <li align = "center">Delete This Picture </li> <li id = "upload_pic_link" align = "center">Upload New Picture </li> </ul> </li> <li class = "comment_color pic_comments">Comments</li> <li class = "clear"> </li> </ul> css .pic_options ul li{z-index:603;color:#fff;margin:0px;padding:0px;width:142px;height;80px;border-bottom:1px solid #fff;cursor:pointer;} Quote Link to comment https://forums.phpfreaks.com/topic/262081-how-does-one-set-the-height-of-a-list-item-in-a-drop-down-menu/ Share on other sites More sharing options...
Mahngiel Posted May 4, 2012 Share Posted May 4, 2012 that's some scary stuff u got there... http://jsfiddle.net/MCC5a/ Quote Link to comment https://forums.phpfreaks.com/topic/262081-how-does-one-set-the-height-of-a-list-item-in-a-drop-down-menu/#findComment-1343113 Share on other sites More sharing options...
Jessica Posted May 4, 2012 Share Posted May 4, 2012 height;80px; Doesn't anything look wrong there? You may want to format your code a little better body{ color: #FFFFFF; border: 2px solid red; } is a lot easier to read than the way you have it. Quote Link to comment https://forums.phpfreaks.com/topic/262081-how-does-one-set-the-height-of-a-list-item-in-a-drop-down-menu/#findComment-1343118 Share on other sites More sharing options...
salem80 Posted May 7, 2012 Share Posted May 7, 2012 You done little mistake replace height;80px; with height:80px; Typo Quote Link to comment https://forums.phpfreaks.com/topic/262081-how-does-one-set-the-height-of-a-list-item-in-a-drop-down-menu/#findComment-1343833 Share on other sites More sharing options...
drayarms Posted June 17, 2012 Author Share Posted June 17, 2012 CSS padding solved the problem. Quote Link to comment https://forums.phpfreaks.com/topic/262081-how-does-one-set-the-height-of-a-list-item-in-a-drop-down-menu/#findComment-1354660 Share on other sites More sharing options...
deathadder Posted June 30, 2012 Share Posted June 30, 2012 or you could of fixed a simple typo Quote Link to comment https://forums.phpfreaks.com/topic/262081-how-does-one-set-the-height-of-a-list-item-in-a-drop-down-menu/#findComment-1358089 Share on other sites More sharing options...
haku Posted July 1, 2012 Share Posted July 1, 2012 could of Could have. But yeah, fixing the typo would have helped. Quote Link to comment https://forums.phpfreaks.com/topic/262081-how-does-one-set-the-height-of-a-list-item-in-a-drop-down-menu/#findComment-1358251 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.