While this will work, I don't recommend it. My method for margins around
headings and paragraphs has always been to remove top margins on all
text and just set bottom margins on everything. This allows me to
control the spacing between headings and the following paragraphs
without needing
Tom Livingston wrote:
While this will work, I don't recommend it. My method for margins around
headings and paragraphs has always been to remove top margins on all
text and just set bottom margins on everything. This allows me to
control the spacing between headings and the following
While this will work, I don't recommend it. My method for margins around
headings and paragraphs has always been to remove top margins on all
text and just set bottom margins on everything. This allows me to
control the spacing between headings and the following paragraphs
without needing
Your margin under the h1 is the correct size. You've set it to 1em, and
a 1em margin on a significantly bigger h1 is going to be bigger than on
the smaller p. If you want a smaller margin there, set it to a smaller
value, like .5em.
If your h1 element is set to 1.4em and that (through
Scott Sauyet wrote:
The paragraphs after the header elements need to have no top margin.
Ideally, you would do this with
h1 + p, h2 + p, h3 + p {
margin-top: 0;
}
but the 800-lb gorilla that is IE(7) doesn't understand this. You can
simply add a class to those
this makes me sound really dumb, but are you sure you're setting the
bottom margin on the right element?
#cotedroit p {margin-bottom:10px}
this is going to set a bottom margin on your paragraph tags, not your
header tags.
victor NOAGBODJI wrote:
In my CSS I have h1,h2,h3 {margin:0;padding:0}
So that I can set margin bottom; the problem is that it isn't working.
You're running into a problem with collapsing margins. Adjacent
vertical margins are combined into one, and placed at the top:
victor NOAGBODJI wrote:
In my CSS I have h1,h2,h3 {margin:0;padding:0}
So that I can set margin bottom; the problem is that it isn't working.
Am I doing something wrong?
I don't know as I am not sure I understand the question.
CSS snip :
form,p,h1,h2,h3 {margin:0;padding:0}
#cotedroit