my div isn't full height, why ???/

Discussion in 'CSS' started by bondigor69, Dec 15, 2013.

  1. #1
    here's my site http://giantgag.com/

    you'll see at the top the div class index_container suppose to have all posts inside but it doesn't.
    why. I can't fix it. The div is opened and closed properly
     
    bondigor69, Dec 15, 2013 IP
  2. wiicker95

    wiicker95 Well-Known Member

    Messages:
    438
    Likes Received:
    37
    Best Answers:
    10
    Trophy Points:
    100
    #2
    Haven't checked it live, but I suspect that some of its children are floated.

    .index_container {
    overflow:hidden;
    }

    This above should solve your problem.

    --edit--

    Just tested it: it solved the problem.
     
    Last edited: Dec 15, 2013
    wiicker95, Dec 15, 2013 IP
  3. bondigor69

    bondigor69 Greenhorn

    Messages:
    58
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    18
    #3
    respect it worked
     
    bondigor69, Dec 15, 2013 IP
  4. bondigor69

    bondigor69 Greenhorn

    Messages:
    58
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    18
    #4
    you might help me with this one too
    http://giantgag.com/topics/feel

    How I center the last post in center
    I tried margin 0 auto but doesnt work
     
    bondigor69, Dec 15, 2013 IP
  5. wiicker95

    wiicker95 Well-Known Member

    Messages:
    438
    Likes Received:
    37
    Best Answers:
    10
    Trophy Points:
    100
    #5
    Indeed, I can.

    As a rule of thumb, you CANNOT center floated elements. Now, there IS a way to do it.

    Target the last child, say float:none for it, and apply margin:auto to it.

    .index_thumb:last-child {
    float:none !important;
    margin:auto;
    }

    I put important because floats are declared multiple times throughout your style sheets, so I specified the importance just to be sure.

    A side note -- this pseudo-class is NOT cross-browser compatible. It only works on IE9+ (unlike :first-child which is supported on IE8+).
    If you want to make it cross-browser compatible, then you would have to use some scripting to target the last child only (and only if there's 1 in the last row) and apply the above to it.
     
    wiicker95, Dec 15, 2013 IP
  6. bondigor69

    bondigor69 Greenhorn

    Messages:
    58
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    18
    #6
    ok i see. what I'll do i'll display them inline-block and add margin 0 auto
     
    bondigor69, Dec 15, 2013 IP
  7. bondigor69

    bondigor69 Greenhorn

    Messages:
    58
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    18
    #7
    can you help me with that to please.
    I have this right_module
    http://giantgag.com/funny-animals/finally-in-bed-and-have-to-pee?pid=867

    I added overflow hidden and removed float:right. it fixed the problem. but now when the screen resolution is smaller the right_module doesn't go under the post section
     
    bondigor69, Dec 15, 2013 IP