Bootstrap: CSS - height of list-group-item

后端 未结 2 1318
伪装坚强ぢ
伪装坚强ぢ 2021-02-04 10:27

Please Consider follow JSFiddle:

http://jsfiddle.net/7W2r4/12/

As you might notice: the list-group-item is fully collapsed. And i can\'t seem to mak

2条回答
  •  情深已故
    2021-02-04 10:35

    You can add overflow:hidden or other "clear-fix" code to the list-group-item if you need to retain the floats within the items. Floats always cause problems with the height of the floated items. Clearing them or setting overflow will force the height to be calculated properly. See CSS: Floating divs have 0 height for more info on this.

    .list-group-item
    {
      overflow:hidden;  
      position: relative;
      display: block;
      padding: 10px 15px;
      margin-bottom: -1px;
      background-color: #fff;
      border: 1px solid #ffffd;
    }
    

    Since you are using Bootstrap you could add the class="clearfix" to HTML for the list-group-items

提交回复
热议问题