I have a horizontal <ul> with three to four <li>s The total width of my li items is 100px but ul takes 100% width: I need the UL to take only the space that is required for lis.
Regards
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Try adding an inline css:
If you want your ul to have a margin/padding top/bottom and act as an inline element use inline-block.
Instead of using hacks, try this method from Paul Irish:
http://paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/