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
    Jan 2014
    Location
    Sydney
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Phantom gap down side of template

    Hi all,
    I've been messing around with tumblr theme-ing (not really hard) but I've encountered a problem with my template.

    You can view the work in progress here: http://momentsdamour.tumblr.com/

    Note: all images aren't my own and are purely there for placeholding purposed.
    There is currently a gap down the entire length of the page down the right hand side and it doesn't affect the red navigation bar or the black footer, but there is a definate gap next to the header. All widths are set to 100%, such as wrapper, header, content, footer, nav bar and I can't figure out or find what is causing this gap to happen.

    I thought maybe it had something to do with tumblr's tool buttons but I don't know...

  • #2
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,675
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    Hello EllsyPO,
    You break the box model rule when you add margin or padding to a 100% width element. How can the browser know how wide to be? 100% plus 20px padding is ...how wide?

    See the box model here. The box model says that whatever you put inside an element cannot be larger than that element. margin/padding/border all count when figuring width/height.


    To illustrate, remove these bits highlighted in red:
    Code:
    #description {
    color: #000000;
    font-family: 'Helvetica Neue',Arial,Helvetica, sans-seriff;
    margin-bottom: 20px;
    padding: 10px;
    text-align: center;
    width: 100%;
    }
    #footer {
    background-color: #000000;
    padding: 10px;
    width: 100%;
    }
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad

  • Users who have thanked Excavator for this post:

    EllsyP0 (01-07-2014)

  • #3
    New to the CF scene
    Join Date
    Jan 2014
    Location
    Sydney
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Thanks, that's got rid of the gap. You are very helpful


  •  

    Tags for this Thread

    Posting Permissions

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