Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Tightening Up line-height on an <a href> text

Tags:

css

I have <a> tag inside a <li> that have text to make a hyperlink. When the text is too long, it wraps. I am trying to tighten the spacing between the lines of the wrap and cannot figure out a way to do it in CSS. I tried line-height but it has no effect on tightening it, only making it larger.
Anyone have an ideas?

like image 412
Wally Kolcz Avatar asked May 30 '13 15:05

Wally Kolcz


1 Answers

You simply have to set the line-height on the parent element and not on the a itself.

http://jsfiddle.net/jmQfr/

like image 85
James Montagne Avatar answered Oct 13 '22 01:10

James Montagne