HighDots Forums  

Do paragraph bottom margins overrule body margins?

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


Discuss Do paragraph bottom margins overrule body margins? in the Cascading Style Sheets forum.



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

Default Do paragraph bottom margins overrule body margins? - 11-23-2006 , 01:42 PM






Do paragraph bottom margins overrule body margins? (To explain what I mean,
http://www.xmission.com/~wake/computerrules.html has 5% margins, including the
bottom margin, in IE, but not in Firefox. I assume Firefox does it correctly.
Does this no-5%-bottom-margin happen because I have a specific paragraph bottom
margin listed in the stylesheet after I have listed the 5% body margin?)



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

Default Re: Do paragraph bottom margins overrule body margins? - 11-23-2006 , 04:52 PM






In article <ek4q3i$j05$1 (AT) news (DOT) xmission.com>,
Paul Wake<wakeMYFINGER (AT) xmission (DOT) com> wrote:

Quote:
Do paragraph bottom margins overrule body margins?
Yes. You may or may not know that there is a "hidden stylesheet"
that browsers use as default. In general, either through the
hidden one or your own (which overrides the hidden where there is
a clash), a child specification will push aside any
characteristic that would otherwise be inherited.

--
dorayme


Reply With Quote
  #3  
Old   
Michael Fesser
 
Posts: n/a

Default Re: Do paragraph bottom margins overrule body margins? - 11-24-2006 , 07:51 AM



..oO(Paul Wake)

Quote:
Do paragraph bottom margins overrule body margins? (To explain what I mean,
http://www.xmission.com/~wake/computerrules.html has 5% margins, including the
bottom margin, in IE, but not in Firefox. I assume Firefox does it correctly.
Does this no-5%-bottom-margin happen because I have a specific paragraph bottom
margin listed in the stylesheet after I have listed the 5% body margin?)
No, it's a bit more complicated in this case. Both content boxes are
floated, hence taken out of the normal flow. If you apply a border to
the body element, you'll see its real size - it doesn't stretch down to
the end of the page.

Micha


Reply With Quote
  #4  
Old   
Paul Wake
 
Posts: n/a

Default Re: Do paragraph bottom margins overrule body margins? - 12-03-2006 , 08:15 PM



I appreciate the replies. However, I think I'm confused, and must be missing a
basic concept somewhere. I think a little white space looks good, so I use 5%
margins in a body tag. I'd think that would put whatever is in the body (which
is everything) inside a nice 5% margin. But
http://www.xmission.com/~wake/computerrules.html uses float to make two columns
buy in doing so I don't get white space at the bottom of the page; the actual
body margin turns out to be pretty high up on the page and so effectively
invisible. If I switch to absolute positioning to do two columns (
http://www.xmission.com/~wake/computerrules.html ) I still lose my white space
on the bottom (this is in Firefox, not IE), so that would seem to mean that
something other than float taking things out of normal flow is causing me to
lose my white space. What is it?



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

Default Re: Do paragraph bottom margins overrule body margins? - 12-03-2006 , 09:43 PM



In article <ekvsqp$g9k$1 (AT) news (DOT) xmission.com>,
Paul Wake<wakeMYFINGER (AT) xmission (DOT) com> wrote:

Quote:
I appreciate the replies. However, I think I'm confused, and must be missing
a
basic concept somewhere. I think a little white space looks good, so I use
5%
margins in a body tag. I'd think that would put whatever is in the body
(which
is everything) inside a nice 5% margin.

Well, that is simple enough. It puts 5% margins all around
(rather a lot btw? why would someone on a small screen appreciate
that? Lose such big top and bottom margins.)

Quote:
But
http://www.xmission.com/~wake/computerrules.html uses float to make two
columns
buy in doing so I don't get white space at the bottom of the page;
I get tons from your site?

Quote:
the actual
body margin turns out to be pretty high up on the page and so effectively
invisible.

what are you talking about? Margins are on the left and right and
top and bottom.

Quote:
If I switch to absolute positioning to do two columns (
http://www.xmission.com/~wake/computerrules.html ) I still lose my white
space
Not on my FF

--
dorayme


Reply With Quote
  #6  
Old   
Paul Wake
 
Posts: n/a

Default Re: Do paragraph bottom margins overrule body margins? - 12-03-2006 , 11:24 PM



In article <ekvsqp$g9k$1 (AT) news (DOT) xmission.com>, Paul Wake says...
Quote:
I appreciate the replies. However, I think I'm confused, and must be missing a
basic concept somewhere. I think a little white space looks good, so I use 5%
margins in a body tag. I'd think that would put whatever is in the body (which
is everything) inside a nice 5% margin. But
http://www.xmission.com/~wake/computerrules.html uses float to make two columns
buy in doing so I don't get white space at the bottom of the page; the actual
body margin turns out to be pretty high up on the page and so effectively
invisible. If I switch to absolute positioning to do two columns (
http://www.xmission.com/~wake/computerrules.html ) I still lose my white space
on the bottom (this is in Firefox, not IE), so that would seem to mean that
something other than float taking things out of normal flow is causing me to
lose my white space. What is it?
Oops--that second URL (switching from float to absolute positioning) should have
been http://www.xmission.com/~wake/computerrules2.html , and in my Firefox, I
get white space across the top and the sides of the page, but the lowest
reaching text on the bottom is right to the bottom of the viewport.




Reply With Quote
  #7  
Old   
Gus Richter
 
Posts: n/a

Default Re: Do paragraph bottom margins overrule body margins? - 12-04-2006 , 08:42 AM



Paul Wake wrote:
Quote:
I appreciate the replies. However, I think I'm confused, and must be missing a
basic concept somewhere. I think a little white space looks good, so I use 5%
margins in a body tag. I'd think that would put whatever is in the body (which
is everything) inside a nice 5% margin. But
http://www.xmission.com/~wake/computerrules.html uses float to make two columns
buy in doing so I don't get white space at the bottom of the page; the actual
body margin turns out to be pretty high up on the page and so effectively
invisible. If I switch to absolute positioning to do two columns (
http://www.xmission.com/~wake/computerrules.html ) I still lose my white space
on the bottom (this is in Firefox, not IE), so that would seem to mean that
something other than float taking things out of normal flow is causing me to
lose my white space. What is it?
Re: http://www.xmission.com/~wake/computerrules.html

Both 'float' and 'absolute' (as well as 'fixed') elements are out of the
normal flow and therefore present no height component to their container.

'Static' and 'relative' elements are in the normal flow.
Use this method:

div.right {
/*float: right; width: 45%; Removing this results in div.right
flowing to the right (and wrapping
around) of div.left for the remaining
available width. Giving it a margin-left
greater than the width of div.left
prevents the wrapping */
margin-left:55%; /* results in 45% width right column */
border-top:1px solid white; /* to cancel collapsing margins */
}

--
Gus


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 - 2009, Jelsoft Enterprises Ltd.