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 2 of 2
  1. #1
    New Coder
    Join Date
    Nov 2011
    Posts
    12
    Thanks
    1
    Thanked 0 Times in 0 Posts

    (Hopefully) Small CSS Issue

    I don't have a lot of CSS experience, just enough to be somewhat dangerous. Anyway, I've been trying to widen my main post area, but I can't seem to figure out why my background keeps laying over my text and images. Can someone take a look and offer me a simple fix? It would be greatly appreciated.

    – Jake

    http://www.kingcripple.com/2012/11/c...iple-viewings/
    Last edited by Kingcripple; 12-17-2012 at 10:10 PM.

  • #2
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,668
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    Hello Kingcripple,
    When you widen .post to 700px it doesn't fit in it's 660px wide parent containers anymore.

    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.

    Try this instead -
    Code:
    #container {
        float: left;
        width: 700px;
    }
    #content {
        margin: 0;
        overflow: hidden;
        /*width: 660px;*/
    }
    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


  •  

    Posting Permissions

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