2013-02-25 80 views
1

我遇到了圍繞圖像的p文本的填充問題: 有沒有人看到問題?CSS填充問題w /圖像

我試圖添加填充CSS的 「P」 元素,但沒有任何效果:

enter image description here

這裏是培訓相關HTML:

<div id="mid-featureleft" class="rounded"> 
     <div class="contentheader"> 
      <h1>Georgio Varsari Painters</h1> 
     </div> 
     <div class="imagebox"> 
      <img height="200px" width="303px" src="Images/Home/HomePage1.jpg" alt="Welcome to Vasari's" style="margin: 0 0 0 0;" /> 
     </div> 
     <p> 
      Established in 1965, the Vasari's Team of Painters and Craftsmen have over 100 years of combined experience delivering impeccable Museum Quality Painting Services for Customers in Washington DC and Northern Virginia. 
      We have experience with every type painting project that exists. For that reason, we are able to take on some of the more difficult restoration jobs that other Painting Companies shy away from.</p> 
     <p> 
      Christian Vasari has nearly three decades of painting experience working under the auspices of his father and Company Founder, Anthony Vasari. 
      You will have the comfort of knowing that your Home and Property is in the right hands of a heavily experienced and knowledgeable group of Professionals who have successfully completed thousdands of painting projects.</p> 
    </div> 

這裏是培訓相關的CSS:

#mid-featureleft { 
    height:250px; 
    width:609px; 
    margin: 12px 0 0 0; 
    float:left; 
    position:relative; 
    background-color:#E7EFF7; 
    /*background-color:orange;*/ 
} 
#mid-featureleft h1 { 
    color: red; 
    font-family: Arial; 
    font-size:25px; 
} 
#mid-featureleft p { 
    color: #333366; 
    margin: 0 0 0 0; 
    font-size:12px; 
    /*line-height:14px;*/ 
    padding: 5px 5px 5px 5px; 
} 
#mid-featureleft .contentheader { 
    height:30px; 
    width:302px; 
    text-align:left; 
    line-height:29px; 
    display: block; 
    float: left; 
    margin:0 0 0 0; 
    padding: 0 0 0 4px; 
    position:relative; 
} 
#mid-featureleft .imagebox { 
    height:200px; 
    width:303px; 
    /*display: block;*/ 
    float: right; 
    margin:0 0 0 0; 
    padding: 0 0 0 0; 
    /*background-color:green;*/ 
} 

回答

3

您必須爲此元素添加邊距

#mid-featureleft .imagebox { margin: 0 0 15px 15px; } 
+0

謝謝,其實我加了保證金的圖像標籤本身,而是你是正確的,我需要這樣的imagebox類。 – Paul 2013-02-25 20:49:09

0

添加一些保證金例如:

#mid-featureleft .imagebox { margin:10px;}