473,396 Members | 1,858 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

why paragraphs have a space on top in FireFox?


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/...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?

Jul 24 '05 #1
8 6838
On 19 May 2005 10:30:48 -0700, lk******@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/...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
Jul 24 '05 #2
lk******@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/...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/>.
Jul 24 '05 #3
lk******@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)
Jul 24 '05 #4
Jim Moe wrote:
lk******@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.


Wrong. Transitional only triggers quirks mode when the DOCTYPE's URL is
absent, and the OP's page has the URL, so the page WILL be rendered in
standards mode.
Jul 24 '05 #5
In article <cP********************@rogers.com>,
C A Upsdell <""cupsdellXXX\"@-@-@XXXupsdell.com"> wrote:
Wrong. Transitional only triggers quirks mode when the DOCTYPE's URL is
absent, and the OP's page has the URL, so the page WILL be rendered in
standards mode.


Transitional with URL triggers the Almost Standards mode in Firefox. It
doesn't make a difference with paragraph margins, though.

--
Henri Sivonen
hs******@iki.fi
http://hsivonen.iki.fi/
Mozilla Web Author FAQ: http://mozilla.org/docs/web-developer/faq.html
Jul 24 '05 #6
Henri Sivonen wrote:
In article <cP********************@rogers.com>,
C A Upsdell <""cupsdellXXX\"@-@-@XXXupsdell.com"> wrote:

Wrong. Transitional only triggers quirks mode when the DOCTYPE's URL is
absent, and the OP's page has the URL, so the page WILL be rendered in
standards mode.

Transitional with URL triggers the Almost Standards mode in Firefox. It
doesn't make a difference with paragraph margins, though.


Yeah, I know. I did not mention this detail for fear of confusing the
OP with information not strictly relevant to him/her.
Jul 24 '05 #7
Jim Moe wrote:

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.


My information is that HTML 4.01 Transitional triggers Quirks Mode.
HTML 4.01 Transitional "with URL" triggers Standards Mode (which he uses).

--
Gus
Jul 24 '05 #8
Rob T. wrote:
On 19 May 2005 10:30:48 -0700, lk******@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/...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
Jul 24 '05 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

40
by: | last post by:
Could someone cite some offical rule or documentation with regard to the <P> tag? I've seen folks put it in between paragraphs... and others wrap it around a paragraph. I'd think to use it...
7
by: Gustaf Liljegren | last post by:
I continued on the example shown earlier today: http://gusgus.cn/test/index.html Now I get some unwanted space in Firefox (the red space just below the first image) which doesn't appear in...
26
by: Spondishy | last post by:
Hi, I have a problem with divs and padding in IE6 and Firefox. Basically my example that I have attached works exactly how I want in IE6, but padding is treated differently in Firefox. My...
3
by: Simon Dean | last post by:
Hello! Im looking to try and get into CSS for formatting my sites. Seems like a nice premise, and should allow easier design for the future. But gees, Im having a hard time of it. I would...
5
by: dw | last post by:
hello - first, let me state that i am an Asp.Net rookie. here is the situation: i have a page that looks good in the vs.net designer, but when the page renders there are extra amounts...
22
by: Brent | last post by:
I want to paste a lengthly text document into a web page and have it retain all of whitespace and line breaks. I first tried the <pretag but that didn't work because it doesn't wrap the text. I...
16
by: danep | last post by:
Hi all, On my site I have a section of code that resembles the following: <p id="gear" style="display: none;"> <p>test</p> </p> This renders fine in Firefox (that is, nothing is...
4
by: Sjef Janssen | last post by:
Hallo, I'm trying to create boxes that have nicely spaced paragraphs, but a title that is in a colored line full-width. Here is my styles: In the div content I create the framed boxes and...
1
by: littlealex | last post by:
IE6 not displaying text correctly - IE 7 & Firefox 3 are fine! Need some help with this as fairly new to CSS! In IE6 the text for the following page doesn't display properly - rather than being...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.