Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    May 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    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

  • #2
    Senior Coder koyama's Avatar
    Join Date
    Dec 2006
    Location
    Copenhagen, Denmark
    Posts
    1,246
    Thanks
    1
    Thanked 5 Times in 5 Posts
    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;
    }

  • #3
    New to the CF scene
    Join Date
    May 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    thanks!

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

    www.ckmca.com


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •