Unexplained white space when using clear:both

前端 未结 3 1644
逝去的感伤
逝去的感伤 2020-12-15 10:47

I\'m building a Joomla 1.7 website and I\'m using a gallery plugin. This works out real nice except for one problem. In the gallery plugin you can insert a description that

相关标签:
3条回答
  • 2020-12-15 11:20

    the class pg-category-view-desc probably give the div float:left or float:right and it also has a fixed height and the clear apply the div height

    0 讨论(0)
  • 2020-12-15 11:30

    You must have a sidebar on the left or the right with a floating element in it (or which is floating itself).

    The clear:both causes the element to be under that floating element.

    See the problem here: http://jsfiddle.net/9Razw/

    One solution is to set overflow: hidden on #phocagallery or a parent of the clear:both element.

    0 讨论(0)
  • 2020-12-15 11:31

    Use it

    .clear
    {
      height:0px;
      clear:both;
    }
    
    0 讨论(0)
提交回复
热议问题