Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how can I reduce the spacing between lines with CSS

Status
Not open for further replies.

fiuPikeOY

Programmer
Jun 14, 2004
143
US
Hello,

Can someone tell me how I can reduce the spacing between lines. they are <p> tags not TR.

Thanks in advance
 
line-height will reduce the size of each line of text.
Code:
p {
    line-height: 10px;
}

*cLFlaVA
----------------------------
Lois: "Peter, you're drunk!"
Peter: "I'm not drunk, I'm just exhausted from stayin' up all night drinking!
 
... or if you want relative heights:
Code:
p {
    line-height: 0.9em;
}

Cheers, Mike.
 
I would recommend you use relative height though, then if in the future you wish to use a larger font size for example, the line-height will expand accordingly and prevent the lines of text overlapping, which could happen if you use an absolute measurement.

Regards, Andy.
**************************************
My pathetic attempts at learning HTML can be laughed at here:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top