473,791 Members | 3,074 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 6874
On 19 May 2005 10:30:48 -0700, lk******@geocit ies.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******@geocit ies.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******@geocit ies.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******@geocit ies.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******@geocit ies.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
3381
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 effectively, it'd have to be wrapped, correct? Thanks, - Michael
7
8835
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 IE6. I've double-checked the CSS for any padding or margings than may cause it, but have found none. How can I remove it? Thanks,
26
8409
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 example is below. http://www.villas2u.com/example/test.htm http://www.villas2u.com/example/styles.css I realise that the issue is with the padding of 10px pushing the
3
9019
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 like to create something like at http://www.blargle.co.uk or http://www.celebrityresearcher.co.uk without the tables. I figure should be easy, to have two DIV rows, 100% width, and then have
5
1936
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 (vertically) of space between controls. i have all of the controls in a table, to help line them up, and I have reviewed the html to verify that there are no extra spaces or paragraphs or breaks between the controls. however, when i run the web site,...
22
3075
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 then moved to CSS and the white-space property, but I can't seem to get it to work either. white-space: pre does the same as <preand white-space: pre-wrap doesn't seem to be supported by any browsers I've tested with. I tried word-wrap:...
16
3792
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 displayed). However, in Internet Explorer, "test" is still printed. It appears
4
1931
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 give then a padding at the left of 20px. Problem is that hte title gets the same padding, whereas it should align at the left frameline of the box.
1
4225
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 aligned to the top, along with the slideshow and link buttons, you have to scroll down to see the text - how can I make IE6 display correctly? http://geekarama.co.uk/new_home.html here is the code for new_home.html and following that the CSS...
0
10428
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10207
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10156
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9997
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9030
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6776
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5435
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4110
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2916
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.