Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Line height of wrapping text in list items

Tags:

css

On the http://steve.brettatkin.com/projects.php when you hover over "Work", a sub-menu appears. The 4th and 5th links have text that wraps. How do I decrease the line-height so that the second line of the link doesn't look like a new link?

I've tried a combination of margin/padding/line-height on the <li> but it isn't working.

like image 231
Brett Avatar asked Dec 10 '22 06:12

Brett


1 Answers

Remove the line-height from the <a> inside your <li>s and put it on the <li>s instead, then use margin-top and margin-bottom for the margin between the <li>s and use the line-height for the line-height of single <li>s

(making the hover state of the <a>s there bold also makes the menu jump when hovering cause it no longer always fits on 1 line)

like image 52
Matijs Avatar answered Jan 12 '23 16:01

Matijs