HighDots Forums  

spacing betw paragrs -- FF vs IE..

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss spacing betw paragrs -- FF vs IE.. in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
maya
 
Posts: n/a

Default spacing betw paragrs -- FF vs IE.. - 09-28-2006 , 10:41 AM






hi,

I'm having a problem with spacing betw. paragraphs, whether use <br>'s
or <p>'s.. FF inserts so much more space betw. paragraphs than IE does
<br><br> shows up differently in FF from how it shows up in IE.. I know
it's better practice to use <p> instead of <br>'s, but FF inserts space
ABOVE paragraph when you use <p>...

any comments about this would be appreciated.. thank you..

Reply With Quote
  #2  
Old   
maya
 
Posts: n/a

Default Re: spacing betw paragrs -- FF vs IE.. - 09-28-2006 , 10:44 AM






maya wrote:
Quote:
hi,

I'm having a problem with spacing betw. paragraphs, whether use <br>'s
or <p>'s.. FF inserts so much more space betw. paragraphs than IE does
br><br> shows up differently in FF from how it shows up in IE.. I know
it's better practice to use <p> instead of <br>'s, but FF inserts space
ABOVE paragraph when you use <p>...

any comments about this would be appreciated.. thank you..
sorry, have one more question about this...

</div> (note it's a CLOSE-div tag..) autom. starts whatever comes after
in a new line, right?

and </span> doesn't... is this correct?

thanks again..



Reply With Quote
  #3  
Old   
Harlan Messinger
 
Posts: n/a

Default Re: spacing betw paragrs -- FF vs IE.. - 09-28-2006 , 10:51 AM



maya wrote:
Quote:
hi,

I'm having a problem with spacing betw. paragraphs, whether use <br>'s
or <p>'s.. FF inserts so much more space betw. paragraphs than IE does
br><br> shows up differently in FF from how it shows up in IE.. I know
it's better practice to use <p> instead of <br>'s, but FF inserts space
ABOVE paragraph when you use <p>...

any comments about this would be appreciated.. thank you..
Don't use <br><br>. Paragraph spacing is not what <br> is for. If you're
using those instead of <p>, then you're basically saying that your whole
page is one paragraph. Is it? The purpose of HTML markup is to describe
the structural composition of your document, not to tell the browser
where line breaks go. It's then up to the browser to follow its own
rules for inserting line breaks, applying any CSS rules that have been
defined have the browser and/or the user call for it.

Do you really need paragraphs on your pages to be spaced differently
from paragraphs the user sees on every other page on the Web? That's
unlikely. If you do need to do that, or you need to alter the spacing
for a particular *kind* of paragraph, such as image captions or
footnotes, use the CSS margin properties.


Reply With Quote
  #4  
Old   
Harlan Messinger
 
Posts: n/a

Default Re: spacing betw paragrs -- FF vs IE.. - 09-28-2006 , 10:57 AM



maya wrote:
Quote:
maya wrote:
hi,

I'm having a problem with spacing betw. paragraphs, whether use <br>'s
or <p>'s.. FF inserts so much more space betw. paragraphs than IE
does <br><br> shows up differently in FF from how it shows up in IE..
I know it's better practice to use <p> instead of <br>'s, but FF
inserts space ABOVE paragraph when you use <p>...

any comments about this would be appreciated.. thank you..

sorry, have one more question about this...

/div> (note it's a CLOSE-div tag..) autom. starts whatever comes after
in a new line, right?

and </span> doesn't... is this correct?
By default browsers treat DIV elements as block elements and SPAN
elements as inline elements. This behavior can be altered by CSS using
the display and float properties.


Reply With Quote
  #5  
Old   
Alan J. Flavell
 
Posts: n/a

Default Re: spacing betw paragrs -- FF vs IE.. - 09-28-2006 , 11:02 AM



On Thu, 28 Sep 2006, Harlan Messinger wrote:

Quote:
By default browsers treat DIV elements as block elements and SPAN
elements as inline elements. This behavior can be altered by CSS
using the display and float properties.
The *rendering* can be altered, indeed; but the nesting of these
elements still has to conform to the relevant DTD - there's no way
that the rules of (x)HTML can be modified by CSS in such a way. (Just
in case anyone thought otherwise...)


Reply With Quote
  #6  
Old   
Spartanicus
 
Posts: n/a

Default Re: spacing betw paragrs -- FF vs IE.. - 09-28-2006 , 01:05 PM



maya <maya778899 (AT) yahoo (DOT) com> wrote:

Quote:
I'm having a problem with spacing betw. paragraphs, whether use <br>'s
or <p>'s.. FF inserts so much more space betw. paragraphs than IE does
br><br> shows up differently in FF from how it shows up in IE.. I know
it's better practice to use <p> instead of <br>'s, but FF inserts space
ABOVE paragraph when you use <p>...
You have control over the margins of the paragraph element, but I
strongly recommend that you don't mess with the browser defaults. These
defaults are interdependent, change the margins on one element such as
<p> and you'll find that other things then also needs adjusting. Unless
you know exactly what you are doing this commonly results in you having
margin issues all over the place and having to add frequent classes in
the markup in an attempt to combat these issues.

Usually a <p> element has a default top and bottom margin, but since
vertical margins normally collapse this rarely causes "double" margins.
In cases where the bottom margin of the block element above the
paragraph isn't adjacent to the paragraph's top margin, for example when
a border on either element prevents the margins from being adjacent,
this causes the margins no longer to collapse and may result in an
unwanted margin.

The best thing to do is to leave it, don't get to anal about the exact
position. You should expect certain rendering differences, this is
perfectly normal, attempting to force an 100% identical display across
various browsers almost always results in the introduction of other,
more serious issues. Plus as noted before you end up driving yourself
potty in your attempts to exert such precise control.

Don't fight this flexibility, it is a strength.

--
Spartanicus


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.