Amount of space after <p> paragraph tag.
Amount of space after <p> paragraph tag.
am 03.12.2007 01:01:05 von RetroMIDI
I notice that the
tag does not always allow the same amount of
space. Some websites have about half a line only. When I check their
code, they have used just
. On other occasions it seems that
has left not just one line of space as per the current font size, but
as much as 20 or 30 pixels.
Can someone please explain to me how to control what
does in terms
of space after a paragraph using a CSS.
Re: Amount of space after <p> paragraph tag.
am 03.12.2007 01:44:02 von dorayme
In article
<22ff74cf-76f8-4770-bfc6-b1fea5b8c408@b40g2000prf.googlegroups.co
m>,
RetroMIDI wrote:
> I notice that the tag does not always allow the same amount of
> space. Some websites have about half a line only. When I check their
> code, they have used just
. On other occasions it seems that
> has left not just one line of space as per the current font size, but
> as much as 20 or 30 pixels.
>
> Can someone please explain to me how to control what
does in terms
> of space after a paragraph using a CSS.
You can control this by setting your own margin and padding on
paragraphs instead of letting the individual browsers set their
own styles. Need an example?
--
dorayme
Re: Amount of space after <p> paragraph tag.
am 03.12.2007 02:05:27 von 23s
"RetroMIDI" wrote in message
news:22ff74cf-76f8-4770-bfc6-b1fea5b8c408@b40g2000prf.google groups.com...
>I notice that the tag does not always allow the same amount of
> space. Some websites have about half a line only. When I check their
> code, they have used just
. On other occasions it seems that
> has left not just one line of space as per the current font size, but
> as much as 20 or 30 pixels.
>
> Can someone please explain to me how to control what
does in terms
> of space after a paragraph using a CSS.
Here's my 'standard' p redefinition that you can play with/modify to suit:
p {
padding: 0;
margin-top: 0;
margin-right: 0;
margin-bottom: 1em;
margin-left: 0;
}
What does it do? It stops all padding and margins for all p tags, and adds a
1em margin to the bottom.
It's important that you do not use pixel spacings for (at least) textual
elements. If the viewer changes their viewable font size, it is desirable
that any white space also changes to suit.
Re: Amount of space after <p> paragraph tag.
am 03.12.2007 10:58:28 von Andy Dingley
On 3 Dec, 00:01, RetroMIDI wrote:
> I notice that the tag does not always allow the same amount of
> space.
It has however much space you specify in CSS, together with the notes
on how these CSS rules should be interpreted.
One aspect that hasn't been mentioned here is "collapsing vertical
margins".
Read all about it here:
http://brainjar.com/css/positioning/
Re: Amount of space after <p> paragraph tag.
am 04.12.2007 08:18:05 von GTalbot
On 2 d=E9c, 19:44, dorayme wrote:
> In article
> <22ff74cf-76f8-4770-bfc6-b1fea5b8c...@b40g2000prf.googlegroups.co
> m>,
>
> RetroMIDI wrote:
> > I notice that the tag does not always allow the same amount of
> > space. Some websites have about half a line only. When I check their
> > code, they have used just
. On other occasions it seems that
> > has left not just one line of space as per the current font size, but
> > as much as 20 or 30 pixels.
>
> > Can someone please explain to me how to control what
does in terms
> > of space after a paragraph using a CSS.
>
> You can control this by setting your own margin and padding on
> paragraphs instead of letting the individual browsers set their
> own styles. Need an example?
>
> --
> dorayme
Hello all,
Sometimes, it's due to a bug too...
http://www.gtalbot.org/BrowserBugsSection/MSIE7Bugs/Ordinary PargWithMarginAu=
to.html
http://www.gtalbot.org/BrowserBugsSection/MSIE7Bugs/DefaultM arginDisappear.h=
tml
G=E9rard
Re: Amount of space after <p> paragraph tag.
am 04.12.2007 08:40:35 von dorayme
In article
<310e57eb-ac77-4576-b3de-41d59eac5555@o6g2000hsd.googlegroups.com
>,
GTalbot wrote:
> On 2 déc, 19:44, dorayme wrote:
Can someone please explain to me how to control what does in
terms
> > > of space after a paragraph using a CSS.
> >
> > You can control this by setting your own margin and padding on
> > paragraphs instead of letting the individual browsers set their
> > own styles. Need an example?
Sometimes, it's due to a bug too...
>
> http://www.gtalbot.org/BrowserBugsSection/MSIE7Bugs/Ordinary PargWithMarginAuto
> .html
>
> http://www.gtalbot.org/BrowserBugsSection/MSIE7Bugs/DefaultM arginDisappear.htm
> l
I have bookmarked your extremely useful:
http://www.gtalbot.org/BrowserBugsSection/
--
dorayme