HighDots Forums  

Amount of space after <p> paragraph tag.

HTML Writing HTML for the Web (comp.infosystems.www.authoring.html)


Discuss Amount of space after <p> paragraph tag. in the HTML forum.



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

Default Amount of space after <p> paragraph tag. - 12-02-2007 , 06:01 PM






I notice that the <p> 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 <p>. On other occasions it seems that <p>
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 <p> does in terms
of space after a paragraph using a CSS.

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

Default Re: Amount of space after <p> paragraph tag. - 12-02-2007 , 06:44 PM






In article
<22ff74cf-76f8-4770-bfc6-b1fea5b8c408 (AT) b40g2000prf (DOT) googlegroups.co
m>,
RetroMIDI <murray.r.3 (AT) gmail (DOT) com> wrote:

Quote:
I notice that the <p> 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 <p>. On other occasions it seems that <p
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 <p> 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


Reply With Quote
  #3  
Old   
asdf
 
Posts: n/a

Default Re: Amount of space after <p> paragraph tag. - 12-02-2007 , 07:05 PM




"RetroMIDI" <murray.r.3 (AT) gmail (DOT) com> wrote

Quote:
I notice that the <p> 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 <p>. On other occasions it seems that <p
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 <p> 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.





Reply With Quote
  #4  
Old   
Andy Dingley
 
Posts: n/a

Default Re: Amount of space after <p> paragraph tag. - 12-03-2007 , 03:58 AM



On 3 Dec, 00:01, RetroMIDI <murray.... (AT) gmail (DOT) com> wrote:
Quote:
I notice that the <p> 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/



Reply With Quote
  #5  
Old   
GTalbot
 
Posts: n/a

Default Re: Amount of space after <p> paragraph tag. - 12-04-2007 , 01:18 AM



On 2 déc, 19:44, dorayme <doraymeRidT... (AT) optusnet (DOT) com.au> wrote:
Quote:
In article
22ff74cf-76f8-4770-bfc6-b1fea5b8c... (AT) b40g2000prf (DOT) googlegroups.co
m>,

RetroMIDI <murray.... (AT) gmail (DOT) com> wrote:
I notice that the <p> 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 <p>. On other occasions it seems that <p
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 <p> 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/BrowserBugsSe...arginAuto.html

http://www.gtalbot.org/BrowserBugsSe...Disappear.html

Gérard


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

Default Re: Amount of space after <p> paragraph tag. - 12-04-2007 , 01:40 AM



In article
<310e57eb-ac77-4576-b3de-41d59eac5555 (AT) o6g2000hsd (DOT) googlegroups.com
Quote:
,
GTalbot <newsgroup (AT) gtalbot (DOT) org> wrote:

Quote:
On 2 déc, 19:44, dorayme <doraymeRidT... (AT) optusnet (DOT) com.au> wrote:
Can someone please explain to me how to control what <p> does in
terms
Quote:
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...
I have bookmarked your extremely useful:

http://www.gtalbot.org/BrowserBugsSection/

--
dorayme


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.