Results 1 to 3 of 3

Thread: IE Headings and space

  1. #1
    Join Date
    Jul 2008
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default IE Headings and space

    Can someone please explain to me why in IE heading have more space above them than when using FFox OP etc.

    I have the following css set

    body, html, form, h1, h2, h3 {
    padding:0;
    margin:0;
    }

    Just in a simple div with do margin or paddings (set 0)

    <div>
    <h1>IE IS A PAIN</h1>
    </div>


    the text is aligned at the top of the div, no space in everything other than IE, please can someone help.

    IE has about a 7px space from the top of the div and the text.



    http://www.funkel.co.uk/ieproblem/aftercare2.html

    if you can see where it says "After Care Advice" the H1's in IE7 anf FF there is a gap appears between the top the the containing div.

    thanks

  2. #2
    Join Date
    Feb 2008
    Location
    Cebu City Philippines
    Posts
    1,160
    Thanks
    17
    Thanked 277 Times in 275 Posts

    Default

    Try to reset the margins:
    Code:
    *{margin:0;padding:0;}
    The snippet you've provided works fine at my end (with a DTD).

    For your problem, doing the reset will work. Or alternatively, try to add highlighted:
    Code:
    .content-bg h1 {
    margin-top:0px;
    }
    
    .content-bg h2 {
    	color: #d3794a;
    	padding: 0 25px 1em 25px; 
    	font-size: 1em;
    margin-top:0px;
    }
    Learn how to code at 02geek

    The more you learn, the more you'll realize there's much more to learn
    Ray.ph!

  3. The Following User Says Thank You to rangana For This Useful Post:

    ninja2001k (08-01-2008)

  4. #3
    Join Date
    Jul 2008
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by rangana View Post
    Try to reset the margins:
    Code:
    *{margin:0;padding:0;}
    The snippet you've provided works fine at my end (with a DTD).

    For your problem, doing the reset will work. Or alternatively, try to add highlighted:
    Code:
    .content-bg h1 {
    margin-top:0px;
    }
    
    .content-bg h2 {
    	color: #d3794a;
    	padding: 0 25px 1em 25px; 
    	font-size: 1em;
    margin-top:0px;
    }
    Thanks for your time looking at my issue, and providing that usefull link cheers

Bookmarks

Posting Permissions

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