473,509 Members | 2,857 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Do paragraph bottom margins overrule body margins?

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?)
Nov 23 '06 #1
6 2265
In article <ek**********@news.xmission.com>,
Paul Wake<wa**********@xmission.comwrote:
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
Nov 23 '06 #2
..oO(Paul Wake)
>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
Nov 24 '06 #3
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?
Dec 4 '06 #4
In article <ek**********@news.xmission.com>,
Paul Wake<wa**********@xmission.comwrote:
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.)
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?
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.
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
Dec 4 '06 #5
In article <ek**********@news.xmission.com>, Paul Wake says...
>
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.
Dec 4 '06 #6
Paul Wake wrote:
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
Dec 4 '06 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
3175
by: Jason Quinn | last post by:
This is an absurdly simple question. Suppose I have a paragraph which contains an image (of an equation) and I'd like the image to be centered in the middle of the paragraph with space above and...
9
3714
by: Frances Del Rio | last post by:
when I test my stuff with the validator in HomeSite it tells me the body tag no longer reads margin attributes.. does this mean now margins are to be specified only in CSS? I work for an...
4
2643
by: Christopher | last post by:
This should be a quick one. URL: http://cfa-www.harvard.edu/~cpilman/Stuff/flush.html Code: ============================= <!DOCTYPE HTML Public "-//W3C//DTD HTML 4.01//EN">...
1
2652
by: Edward | last post by:
I created a simple CSS layout (code and example below) for bloggin/writing but ran into five issues that I need help with: 1. How do I get rid of the right-margin red line on the last three...
5
2335
by: one | last post by:
Cutting out the <br>s.. Anyone who has a semantic/browser problem with this conversion? Thanks. <style> p.line {margin: 0em;} </style> <!-- From --> <p>text text<br />text text</p>
14
4261
by: wshaer | last post by:
Hi all, I have an assignment and I need some help with it. This is the assignment // Research reports are often required to conform to a given standard such as APA or MLA. These standards...
5
11729
by: RetroMIDI | last post by:
I notice that the <ptag 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...
10
1819
by: Yorian | last post by:
Hey everybody, At the moment I am trying to build a website with a footer at the bottom of the viewport if the amount of text is too small and at the bottom of the page if there is enough text....
7
3410
by: GTalbot | last post by:
Hello fellow authoring.stylesheets colleagues, Can someone please explain why the bottom margin of the last inflow block-level child in an overflowed parent should not have its margin reachable....
0
7136
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7344
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7412
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7069
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
1
5060
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4730
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3216
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1570
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
775
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.