PDA

View Full Version : IE/Firefox Line Spacing Differences



Phlashman
May 1st, 2005, 10:50 AM
Hi! I have recently started taking a diversion from Flash and have started going to HTML. However, I notice that with HTML, every file shows up slightly different in every browser.

For example, I have a table that I made. It has 5 rows, and 2 columns. However, the top 4 rows all have a colspan of 2. Basically, each row has a formatting of either <h1> or <p>, and this causes some major differences between browsers.

W3schools says:HTML automatically adds an extra blank line before and after a paragraph.
HTML automatically adds an extra blank line before and after a header.

Firefox obeys this, and adds extra space above and below the text in each table cell, making it very spaced out.

Internet Explorer 6.0 does NOT obey this and makes the table more scrunched together.

How can I make the spacing consistent between browsers?

By the way, this is my page:
http://funplus.whosters.com/sports/index.php

nobody
May 1st, 2005, 02:13 PM
With css you apply a differnt margin to your tag to override the html default.

I don't know if you know anything about css but it'd be done as such.


.noSpace {
margin: 0;
}
// Then in your html

<p class="noSpace">Text...</p>



Voila, no more space.
You're probably not going to want it to apply some padding afterwards though.

Hope this helped at least a bit

Phlashman
May 1st, 2005, 07:21 PM
Thanks xxviii. I didn't know that's what the margin was ;). I do know CSS, so that won't be a problem for me.