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!

HTML command to control paragraph spacing?

Status
Not open for further replies.

moepower

Programmer
Oct 5, 2000
93
US
What is the HTML command I can use to control the paragraph spacing? I have a table with three columns per row, the first two columns contain fields and the third column contains a description text. The text usually wraps around and it looks like the browser is not doing the line spacing equally. ie. It looks something like below

first line of paragraph
second line of paragraph

third line of paragraph with line spacing between 2nd and 3rd line bigger than normal


Thanks,
 
Try the "line-spacing" attribute. Tracy Dryden
tracy@bydisn.com

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard.
 
That is actually a glitch that I used to run into a lot... It seems to happen when text that you made smaller than the default size is forced to wrap.

I haven't had a problem with it for a while, so I can't be sure, but I think I usually &quot;fixed&quot; it by putting a <br> at the end of the line I was having problems with.

Also, I think tsdragon might've been referring to the &quot;line-height&quot; property. I would try it first, and then if that doesn't work try the <br> trick...
 
You're right, it was line-height, not line-spacing! :~/ Tracy Dryden
tracy@bydisn.com

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard.
 
I'm fairly new to HTML so I don't really understand how to use the line-height command. Could you clarify, thanks.

For example, I have the following code,

<table>
<tr>
<td width 650>
&quot;entry field here&quot;
</td>
<td width 100>
&quot;text description here that is bigger than can fit&quot;
&quot;into one single line&quot;
</td>
</tr>
</table>

Thanks,
 
Here's an example:
Code:
<html>
<head>
<style type=&quot;text/css&quot;>
#td1 {
line-height: 40px;
}
</style>
</head>
<body>
<table>
<tr>
	<td width=&quot;650&quot;>
     &quot;entry field here&quot;
     </td>
     <td id=&quot;td1&quot; width=&quot;100&quot;>
     &quot;text description here that is bigger than can fit&quot;
     &quot;into one single line&quot;
     </td>
</tr>
</table>
</body>
</html>
 
I don't know how well that example will work in NN. It seems to have a big problem applying styles to table cells. If it doesn't work, you can always apply the style to a paragraph inside the cell.
Tracy Dryden
tracy@bydisn.com

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard.
 
Good point. NN4.x usually does not like styles applied to table cells, but in this case it actually works (believe it or not).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top