div background getting cutoff

Discussion in 'CSS' started by sixrfan, Aug 23, 2012.

  1. #1
    riddle me this... on this page why doesn't the background of the .entry-content div, which also surrounds the "Products & Services" area extend all the way to the bottom of that area?

    here's the HTML
    
    <div class="entry-content">
    <h1>Welcome to Vintage Pool Tables</h1>
    <h2>Unique, antique & vintage pool tables & accessories</h2>
    <p>Vintage Pool Tables was established to fill a growing need in the pool table market. Instead of paying high end retail for a new pool table or answering an ad for a used pool table that turns out to be a piece of junk, buying from us will bring you true satisfaction and peace of mind. We service the greater New York Tri State area and beyond.</p>
    <hr>
    <div class="product_home_container">
    </div>
    
    Code (markup):
    here's the CSS
    
    .entry-content {
        background: url("/wp-content/uploads/site-elements/content-bg.png") repeat scroll 0 0 transparent;
        border-radius: 15px 15px 15px 15px;
        margin-left: -20px;
        width: 685px;
    }
    
    Code (markup):
    Please advise. Thanks in advance.
     
    sixrfan, Aug 23, 2012 IP
  2. MarkTheUser

    MarkTheUser Member

    Messages:
    206
    Likes Received:
    0
    Best Answers:
    4
    Trophy Points:
    26
    #2
    It looks like it does on my end or i dont understand what your talking about.
     
    MarkTheUser, Aug 26, 2012 IP
  3. sweetkate

    sweetkate Well-Known Member

    Messages:
    381
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    115
    #3
    I get it you are referring to the footer. you need to get the css code for the footer similar to the entrybox content.
    or simply try to make the footer margin at the top to be be negative in order for it to move up
     
    sweetkate, Aug 26, 2012 IP
  4. steve0

    steve0 Member

    Messages:
    28
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    43
    #4
    you could try a <div class="clear"></div> at the bottom of the entry-content div (obviously with a style .clear { clear:both; }) so that it pushes the end of the div below the containing content.
     
    steve0, Oct 17, 2012 IP
  5. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,999
    Best Answers:
    253
    Trophy Points:
    515
    #5
    If this was 1998... Bah, clearing div's...

    Though you're on the right track, floats are removed from flow for height calculations, so the elements inside it are reporting 0 height to the parent. That's what float clearing is for... but wasting an extra element in the markup to do it? Uhm... no.

    Just set overflow:hidden; on that parent wrapper for 'modern' browsers, and use a haslayout trigger (like zoom:1; or the height:1%; "holly hack") to make legacy versions of IE behave.


    NOT that the markup makes the least bit of sense what with the complete gibberish use of heading tags... What makes that a H2? Is it starting a new subsection of the page? Of the H1? Of course not... Much less what makes those H1 since you have a H2 preceeding it, and I'm pretty sure "Products" isn't a subsection of "Unique, antique and vintage pool tables and accessories" either. Of course, it's a turdpress template so naturally the HTML is bloated rubbish, so I'll not rip you a new hole for all the idiotic trash it saddles you with.
     
    deathshadow, Oct 19, 2012 IP