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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Inter-line spacing in Netscape 1

Status
Not open for further replies.

AndyGroom

Programmer
May 23, 2001
972
GB
Hi,

I've a very simple webpage which shows a list:

<STYLE TYPE=&quot;text/css&quot;>
<!- -//
TH { font-family: Arial, Verdana; font-size: 22px; colour: #EFEFEF }
// - ->
</STYLE>

<TABLE><TR><TD>
Item 1<BR>Item 2<BR>Item3 etc...
</TD></TR></TABLE>

When I view the page in Explorer there's only about 2 pixels gap between the 3 items, which is great, but in Netscape there's a gap almost as thick as the text and so the list ends up being a lot higher.

Is there a style element that I can use to dictate the gap between lines?


- Andy
_______________________________
&quot;On a clear disk you can seek forever&quot;
 
The code you posted seems to have a whole lot of problems. You are defining TH element, later you are showing TD's. I guess it was just a mistake:

line-height:

sets the vertical difference between the lines. Though I believe your problems are <table> and <br>s. Netscape probably wraps the table before the <br> and IE after. That means that Netscape jumps in the new line before the br element and then skipping another row. I suggest you try and make the column in the table a little wider. That should solve it.

Hope it helps.
 
Thanks, line-height did the trick.

Just out of interest what's the difference between TH and TD? I've changed it to TD but it just seems to do the same thing.


- Andy
_______________________________
&quot;On a clear disk you can seek forever&quot;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top