By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,953 Members | 1,131 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,953 IT Pros & Developers. It's quick & easy.

spacing betw paragrs -- FF vs IE..

P: n/a
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><brshows up differently in FF from how it shows up in IE.. I know
it's better practice to use <pinstead of <br>'s, but FF inserts space
ABOVE paragraph when you use <p>...

any comments about this would be appreciated.. thank you..
Sep 28 '06 #1
Share this Question
Share on Google+
5 Replies


P: n/a
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><brshows up differently in FF from how it shows up in IE.. I know
it's better practice to use <pinstead 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 </spandoesn't... is this correct?

thanks again..

Sep 28 '06 #2

P: n/a
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><brshows up differently in FF from how it shows up in IE.. I know
it's better practice to use <pinstead 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 <bris 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.
Sep 28 '06 #3

P: n/a
maya wrote:
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><brshows up differently in FF from how it shows up in IE..
I know it's better practice to use <pinstead 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 </spandoesn'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.
Sep 28 '06 #4

P: n/a
On Thu, 28 Sep 2006, Harlan Messinger wrote:
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...)
Sep 28 '06 #5

P: n/a
maya <ma********@yahoo.comwrote:
>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><brshows up differently in FF from how it shows up in IE.. I know
it's better practice to use <pinstead 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
<pand 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 <pelement 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
Sep 28 '06 #6

This discussion thread is closed

Replies have been disabled for this discussion.