Forum Moderators: open

Message Too Old, No Replies

Problem with line spacing with smaller font sizes

         

Marcia

8:05 am on Nov 23, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I've got the problem on a couple of pages with Verdana size 1, and have noticed it in other places, most particularly when it's size 1. There will be an extra line space before the last line of a paragraph, even though there is nothing wrong with the code.

Any solution?

sarkye

8:15 am on Nov 23, 2001 (gmt 0)

10+ Year Member



Marcia does it happen with other faces too? And also, is there a <br> tag before the extra line?

Because I used to find that *adding* a <br> tag at the end of a line would eliminate this problem.

joshie76

11:34 am on Nov 23, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If your tag ends and there are white-spaces afterwards then these can be treated as a space at the default browser font-size, eg:

<font size="1">Boo</font>=>SPACE HERE<=

Which is a bit like having

<font size="1">Boo</font><font size="3"> </font>

You can make sure that this isn't the case by having the appropriate ending tag next to the end of your tags etc..

<font size="1">Boo</font></td>

And it may also help to end inside your font (or span or whatever) tags with a space so any following white-space is ignored:

<font size="1">Boo </font>=>SPACE HERE<=

Josh

PS Let us know if this solves your problem.

IanKelley

8:14 am on Nov 25, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Remove carriage returns and spaces from any code related to the definition and positioning of your text... In some cases 'related' extends to seemingly unconnected </td></tr></table> tags. This pretty much always solves the problem... I've only encountered one case where it didn't which I can only assume is an IE bug.

Marshall

9:26 am on Nov 25, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Marcia,

I can spot this problem on a web page, so don't think it's unique to you. I use to wonder why the line height of the last sentence of a <p> was higher than the rest. All to often, there's no </p> tag immediately after the </font>. I know they say it's not required, but the lack of it will cause the exact problem you described.

Marcia

1:39 pm on Nov 25, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Yes it was the <font> and <br> doing it.

sarkye, Verdana is the only font I use in a real small size; it's got enough spacing to stay legible.

There were an incredible number of redundant font tags on the page (Dreamweaver 2 does that), all mixed in with <br> tags in a nested unordered/ordered list within a <td>.

That was the worst page, and finally pulling every font tag on the page and using a little CSS in the head section straightened it out. I can't believe how many font tags there were.

I think it's time to move on to external CSS and stop using font tags altogether.

Thanks all, that was it!