Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 05-29-2007, 02:07 AM   PM User | #1
echoeon
New to the CF scene

 
Join Date: May 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
echoeon is an unknown quantity at this point
Question simple CSS question

I am having a bit of an issue with gaps in my DIVs on www.ckmca.com when viewed in firefox

as far as i can tell the margins are set to 0 yet there are still appearing.

the only way i have found to eliminate the gaps is to set my margins to -21 (top)

im sure there is a better way, and have look through this forum and my code to see whats wrong but i just dont get it.

any advice?

www.ckmca.com
echoeon is offline   Reply With Quote
Old 05-29-2007, 02:33 AM   PM User | #2
koyama
Senior Coder

 
koyama's Avatar
 
Join Date: Dec 2006
Location: Copenhagen, Denmark
Posts: 1,246
Thanks: 1
Thanked 5 Times in 5 Posts
koyama will become famous soon enough
This is due to margin collapsing.

It may seem weird that the top margin of the h1 element should reside outside the parent elements content area, but this is what the specification says should happen when the parent has no top border or padding. Same thing holds for bottom margins.

Solution:
Code:
h1 {
  margin: 0;
}
koyama is offline   Reply With Quote
Old 05-29-2007, 07:02 AM   PM User | #3
echoeon
New to the CF scene

 
Join Date: May 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
echoeon is an unknown quantity at this point
thanks!

it work great...now all i need is some more content for my site

www.ckmca.com
echoeon is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 07:45 AM.


Advertisement
Log in to turn off these ads.