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 4 of 4
  1. #1
    New Coder
    Join Date
    Jun 2009
    Posts
    21
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Tags creating unwanted gaps

    hi, this is probably a very common problem with a simple answer, but this is my first CSS site and I can't seem to think of the right search criteria in order to get the answer I need!

    Basically, I've got some boxes with rounded corners, so they consist of a top div for the top of the box, a middle div for the content, a bottom div for the bottom of the box, and a container wrapping around the whole thing. The thing is, when I put a header tag on the text in the content div, it creates a massive gap between the top image div and the content div. I'll show you what I mean.

    This is how it should look. I've styled the text this way by seting the text format of the div, rather than using an <h> tag.

    http://www.numyspace.co.uk/~unn_t016...eaceindex.html

    However, this is what happens when I use header tags

    http://www.numyspace.co.uk/~unn_t016...indextest.html

    As you can see, it also does this with the lists. I'm pulling my hair out trying to work it out!

    Please help!
    Cheers

  • #2
    Senior Coder coothead's Avatar
    Join Date
    Jan 2004
    Location
    chertsey, a small town 25 miles south west of london, england.
    Posts
    1,707
    Thanks
    0
    Thanked 237 Times in 232 Posts
    Hi there Spiritualized,

    and a warm welcome to these forums.

    Try adding this rule to your stylesheet...
    Code:
    
    h1,ul {
        margin-top:0;
        margin-bottom:0;
     }
    
    coothead

  • #3
    New Coder
    Join Date
    Jun 2009
    Posts
    21
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Fantastic! Thanks a lot that was really bugging me. Next thing I need to do is work out how to control the lists properly. I'll see if I can work it out myself first

  • #4
    Senior Coder coothead's Avatar
    Join Date
    Jan 2004
    Location
    chertsey, a small town 25 miles south west of london, england.
    Posts
    1,707
    Thanks
    0
    Thanked 237 Times in 232 Posts
    No problem, you're welcome.


  •  

    Posting Permissions

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