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 6 of 6
  1. #1
    New Coder
    Join Date
    Aug 2006
    Posts
    42
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Why is there space underneath my sections?

    Hi

    I'm trying to learn responsive coding, I'm not using any framework for now...but I'm using responsivegridsystem (www.responsivegridsystem.com) as a base. I've produced a basic layout which you can see here
    www.juanchandler.com/responsive/ ....you can view source to see the code as I've put the css the head of the document.

    I don't understand what's causing the space to appear underneath all the divs....looks like a bottom margin although as you'll see I've made the margin and padding 0 on the body tag and the section class.....any help would be much appreciated..also please excuse my silliness if it's something simple.

    thanks

  • #2
    Regular Coder
    Join Date
    Mar 2013
    Posts
    262
    Thanks
    4
    Thanked 67 Times in 67 Posts
    You didn't look closely enough.

    Code:
    .col {
    display: block;
    float: left;
    margin: 1% 0 1% 1.6%;
    }
    My signature :)

  • #3
    New Coder
    Join Date
    Aug 2006
    Posts
    42
    Thanks
    3
    Thanked 0 Times in 0 Posts
    Hi thanks for your reply but I did look closely enough..I did set the bottom margin of the col class to 0 previously but it didn't make any difference.....I've now made it 0 again ........ check www.juanchandler.com/responsive/ and you'll see....do view source... I've checked it firefox and chrome and it's still the same.

  • #4
    Regular Coder
    Join Date
    Mar 2013
    Posts
    262
    Thanks
    4
    Thanked 67 Times in 67 Posts
    Removing the margin-bottom shrunk the gaps. You still have a margin-top.

    margin: 1% 0 1% 1.6%;

    This means

    margin-top: 1%;
    margin-right: 0
    margin-bottom: 1%
    margin-left: 1.6%
    My signature :)

  • #5
    New Coder
    Join Date
    Aug 2006
    Posts
    42
    Thanks
    3
    Thanked 0 Times in 0 Posts
    You're absolutely right, I just kept thinking it was a bottom margin issue only.....my mistake.....thanks alot to you!

  • #6
    Regular Coder
    Join Date
    Aug 2005
    Location
    MS
    Posts
    831
    Thanks
    10
    Thanked 79 Times in 77 Posts
    Might double check/correct these errors:

    CSS

    HTML

    Can only have one named id per page. Maybe make ' id="cell" ' a class instead.
    ☠ ☠RON☠ ☠


  •  

    Posting Permissions

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