Click here to get back home

why paragraphs have a space on top in FireFox?

 HomeNewsGroups | Search | About
 comp.infosystems.www.authoring.html    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
why paragraphs have a space on top in FireFox? lkrubner 05-19-2005
Get Chitika Premium
Posted by lkrubner on May 19, 2005, 11:30 am
Please log in for more thread options



Am I wrong, or do paragraphs have extra space on top in FireFox, when
compared to Microsoft IE. The top of this page is an example:

http://www.publicdomainsoftware.org/index.php?pageId=299

The text in the box at top looks like it has an extra 10 or 20 pixels
of padding at the top, when FireFox is compared to IE. Why is that?


Posted by Rob T. on May 19, 2005, 12:17 pm
Please log in for more thread options


On 19 May 2005 10:30:48 -0700, lkrubner@geocities.com wrote:

>
>Am I wrong, or do paragraphs have extra space on top in FireFox, when
>compared to Microsoft IE. The top of this page is an example:
>
>http://www.publicdomainsoftware.org/index.php?pageId=299
>
>The text in the box at top looks like it has an extra 10 or 20 pixels
>of padding at the top, when FireFox is compared to IE. Why is that?

I guess <P> implicitly has a top margin in Firefox/Netscape. In your
stylesheet for P add:

margin: 0px auto;

Rob

Posted by Gus Richter on May 21, 2005, 12:36 am
Please log in for more thread options


Rob T. wrote:
> On 19 May 2005 10:30:48 -0700, lkrubner@geocities.com wrote:
>
>
>>Am I wrong, or do paragraphs have extra space on top in FireFox, when
>>compared to Microsoft IE. The top of this page is an example:
>>
>>http://www.publicdomainsoftware.org/index.php?pageId=299
>>
>>The text in the box at top looks like it has an extra 10 or 20 pixels
>>of padding at the top, when FireFox is compared to IE. Why is that?
>
>
> I guess <P> implicitly has a top margin in Firefox/Netscape. In your
> stylesheet for P add:
>
> margin: 0px auto;
>
> Rob

Yes, or simply: margin-top:0;

--
Gus


Posted by David Ross on May 19, 2005, 1:13 pm
Please log in for more thread options


lkrubner@geocities.com wrote:
>
> Am I wrong, or do paragraphs have extra space on top in FireFox, when
> compared to Microsoft IE. The top of this page is an example:
>
> http://www.publicdomainsoftware.org/index.php?pageId=299
>
> The text in the box at top looks like it has an extra 10 or 20 pixels
> of padding at the top, when FireFox is compared to IE. Why is that?

There are only three explicit paragraphs on the page, indicated by
the <p> element. This does not include one "null" paragraph,
indicated by <p> </p> (which is contrary to the HTML 4.01
specification per §9.3.1).

The HTML 4.01 specification (§9.3.5) indicates there should indeed
be white-space above and below each paragraph without indicating
how much white-space. Your style-sheet effectively provides for a
margin above each line of a paragraph by having "font-size: .9em"
with "line-height: 1.2em". Per the CSS1 specification §6.1, the
latter is supposed to be interpreted relative to the former. Thus,
there should be margin above the line 20% greater than the height
of the font.

I viewed the page with Mozilla 1.7.8 and RealPlayer 10.0. (I had
to use RealPlayer, which uses an IE clone for a browser, because I
have disabled IE.) There is only a slightly greater space above
the "Public Domain Software: A project" paragraph in Mozilla.
There is significantly LESS space above the "Printer Friendly"
paragraph in Mozilla. With both browsers, the "Login" paragraph is
vertically centered in the black box.

--

David E. Ross
<URL:http://www.rossde.com/>

I use Mozilla as my Web browser because I want a browser that
complies with Web standards. See <URL:http://www.mozilla.org/>.

Posted by Jim Moe on May 19, 2005, 11:56 pm
Please log in for more thread options


lkrubner@geocities.com wrote:
>
> The text in the box at top looks like it has an extra 10 or 20 pixels
> of padding at the top, when FireFox is compared to IE. Why is that?
>
You are using HTML 4.01 Transitional. This invokes the "quirks" mode
for each browser. IE and Firefox have different opinions about spacing in
quirks mode.
Convert the page to HTML 4.01 Strict, which sets the "Standards" mode,
and almost all of the spacing differences disappear.

--
jmm dash list (at) sohnen-moe (dot) com
(Remove .AXSPAMGN for email)

Similar ThreadsPosted
some (undesired) white space in Firefox but not IE November 6, 2006, 2:27 pm
Internet Explorer won't hide nested paragraphs March 11, 2007, 12:12 pm
DIV not recognized by Firefox - It works only in IE - How to replace it for Firefox? May 8, 2007, 5:13 pm
make a div take up space August 21, 2004, 7:33 am
Why unwanted space? July 23, 2005, 10:39 pm
SSI Nav Menu Space February 20, 2007, 12:38 pm
Space around images? November 21, 2007, 4:29 pm
Bold takes up more space? July 13, 2004, 10:35 am
Why Blank Space on Last Row of Table? July 29, 2004, 3:00 am
Space introduced between images October 13, 2004, 2:26 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap