2011-08-23 42 views
9

我正在構建Joomla 1.7網站,並使用插件庫插件。除了一個問題之外,這可以解決問題。在插件庫插件中,您可以插入顯示在所有圖像頂部的描述,但每當使用此插件時,我都會獲得大量的空白。使用明確時無法解釋的空白區域:均爲

http://imgur.com/FGrGienter image description here

的HTML:

<div id="phocagallery" class="pg-category-view" style="width:800px;margin: auto;"> 
    <div class="pg-category-view-desc">Pictures of the Roskilde Family</div> 
    <div id="pg-icons"></div> 
    <div style="clear:both"></div> 
    <div class="phocagallery-box-file" style="height:158px; width:120px;"> 
    <div class="phocagallery-box-file" style="height:158px; width:120px;"> 
    <div class="phocagallery-box-file" style="height:158px; width:120px;"> 
    <div class="phocagallery-box-file" style="height:158px; width:120px;"> 
    <div class="phocagallery-box-file" style="height:158px; width:120px;"> 

如果我刪除空白消失。我用螢火蟲看着我的css,但我不能爲了我的生活找出它爲什麼給我這個空白空間。我使用雅虎CSS重置。

編輯:CSS

DIV ID = 「phocagallery」 級= 「PG-類視圖」:

body, div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, pre, code, form, fieldset, legend, input, button, textarea, blockquote, th, td, p 
{ 
    margin: 0; 
    padding: 0; 
} 
    body { 
    color: #000000; 
    font-family: Verdana,Arial,Helvetica,sans-serif; 
    font-size: 75%; 
    line-height: 1.3; 
} 

人有線索?

+0

我們也需要相關的CSS樣式。或者是實際頁面的鏈接。 –

+0

發佈信息:實際CSS的pg-category-view-desc,他們定義了空白的地方。 – JonH

+0

它不通過插件保留空間可能是按鈕或文本的潛力? – Coops

回答

23

您必須在左側或右側有一個側邊欄,並在其中放置了一個浮動元素(或者它本身是浮動的)。

清除:都導致該元素在該浮動元素下。

看到這裏的問題:http://jsfiddle.net/9Razw/

一種解決方案是設置overflow: hidden上#phocagallery或clear:both元素的父。

+1

這其實就是它!謝謝,現在至少我知道它爲什麼這樣做了!我的整個側欄都是浮動的,它確實落在了側邊欄下面,我甚至沒有注意到。有沒有辦法讓它忽略我浮動的側邊欄? – iggnition

+1

一個解決方案是設置overflow:隱藏在#phocagallery或clear:both元素的父級上。 – arnaud576875

+1

問題解決了!非常感謝! – iggnition

1

類PG-類別 - 視圖 - 遞減可能給DIV浮動:左或浮動:正確的,它也有一個固定的高度,明確申請的股利高度

0

使用它

.clear 
{ 
    height:0px; 
    clear:both; 
} 
+0

,不會修復 – Yashas