1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Content still overflowing!

Discussion in 'CSS' started by 7643sfsag6, Oct 16, 2016.

  1. #1
    hi,
    SEMrush
    I can't for the life of me work out why this text flows out of the container div. i have tried it all!

    html
    <div class="col-md-4">
            <div class="panel panel-default js-hi">
                <div class="panel-heading js-hi" >
                </div>
                <div class="panel-collapse">
                    <div class="panel-body js-hi">
                        test
                        <div class="input-group col-md-12">
                            <h4 id="image_detail_title">test</h4>
                            <div id="image_detail_content">Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus. Phasellus viverra nulla ut metus varius laoreet. Quisque rutrum. Aenean imperdiet. Etiam ultricies nisi vel augue. Curabitur ullamcorper ultricies nisi. Nam eget dui. Etiam rhoncus. Maecenas tempus, tellus eget condimentum rhoncus, sem quam semper libero, sit amet adipiscing sem neque sed ipsum. Nam quam nunc, blandit vel, luctus pulvinar, hendrerit id, lorem. Maecenas nec odio et ante tincidunt tempus. Donec vitae sapien ut libero venenatis faucibus. Nullam quis ante. Etiam sit amet orci eget eros faucibus tincidunt. Duis leo. Sed fringilla mauris sit amet nibh. Donec sodales sagittis magna. Sed consequat, leo eget bibendum sodales, augue velit cursus nunc,</div>
                        </div>
                    </div>
                </div>
            </div>
        </div>  
    HTML:

    css

    .col-md-4{width:50%;height:92%;position: absolute;top:0px;right:0px;cursor:default!important;}
    .panel-default{background:red;height:97%;margin:15px;}
    .panel-heading{background:orange;text-align:center;padding-right:15px}
    .panel-title{font-size:20pt;line-height:-10px}
    .panel-body{font-size:14pt;overflow-x:hidden;overflow:auto;min-height:100px;height:auto;}
    Code (markup):
    thanks!
     
    7643sfsag6, Oct 16, 2016 IP
    SEMrush
  2. wordplucker

    wordplucker Well-Known Member

    Messages:
    205
    Likes Received:
    38
    Best Answers:
    1
    Trophy Points:
    105
    #2
    Heading and Title ID lines do not end with ; is one point.

    From what I can recreate, as you do not have all the CSS there, it works fine.
     
    wordplucker, Oct 16, 2016 IP
  3. PoPSiCLe

    PoPSiCLe Illustrious Member

    Messages:
    4,623
    Likes Received:
    725
    Best Answers:
    152
    Trophy Points:
    470
    #3
    The last line in a CSS rule doesn't have to end with a ; so that is not the reason.
     
    PoPSiCLe, Oct 17, 2016 IP
  4. wordplucker

    wordplucker Well-Known Member

    Messages:
    205
    Likes Received:
    38
    Best Answers:
    1
    Trophy Points:
    105
    #4
    Just looks unfinished is all. Also might be that I do a bit of PHP modding and a ; makes a world of difference in having or not, and can be a bitch to see that it is missing, so I always add it in.

    Still, not having the other CSS I could not recreate fully, but from what I could do it did not overflow.
     
    wordplucker, Oct 17, 2016 IP
  5. PoPSiCLe

    PoPSiCLe Illustrious Member

    Messages:
    4,623
    Likes Received:
    725
    Best Answers:
    152
    Trophy Points:
    470
    #5
    Agreed that it should be there, it makes debugging a lot easier, I'm just saying that it's not needed. Just as an ending ; isn't needed after ending curly brackets in PHP.
     
    PoPSiCLe, Oct 17, 2016 IP
  6. qwikad.com

    qwikad.com Illustrious Member Affiliate Manager

    Messages:
    6,408
    Likes Received:
    1,368
    Best Answers:
    24
    Trophy Points:
    400
    #6
    qwikad.com, Oct 17, 2016 IP
  7. PoPSiCLe

    PoPSiCLe Illustrious Member

    Messages:
    4,623
    Likes Received:
    725
    Best Answers:
    152
    Trophy Points:
    470
    #7
    BTW - the code is shit. What in the world uses six (SIX!) nested divs, with ridiculously named classes and other crap? This reeks of being bootstrap or some other BS.
     
    PoPSiCLe, Oct 17, 2016 IP
    deathshadow likes this.
  8. 7643sfsag6

    7643sfsag6 Member

    Messages:
    56
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    43
    #8
    I removed height: 97%; thanks all.
     
    7643sfsag6, Oct 18, 2016 IP
  9. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,327
    Likes Received:
    1,821
    Best Answers:
    244
    Trophy Points:
    515
    #9
    EXACTLY what I said when this person posted the same thing over on another forum.
     
    deathshadow, Oct 18, 2016 IP