2012-07-16 55 views

回答

1

我想這是你所需要的:http://jsfiddle.net/9sWbc/6/

EDITED CSS:

#infoDiv 
{ 
    width:550px; 
    border:1px solid Red; 
} 
.dataLine 
{  
    width:100%; 
    min-width:650px; 
    height:auto; 
    margin:1px 1px 1px 1px; 
    padding: 0 0 0 0px; 
    /*border:1px solid Cyan;*/ 
} 
.freeTwoColumnFirstEntry 
{  
    height:auto; 
    margin:0 0 0 0px; 
    padding:0 0 0 2px; 
    font:normal 9pt Arial; 
    display:inline; 

} 
.freeTwoColumnSecondEntry 
{  
    height:auto; 
    margin:0 0 0 0px; 
    padding:0 0 0 2px; 
    font:normal 9pt Arial; 
    display:inline; 

} 
#cityDiv, #cityDivVal, #stateDiv, #stateDivVal, #countryDiv, #countryDivVal{ 
    display:inline-block; 
} 
+0

已經編輯了這一點..不是內聯,div的實際上應該是內聯塊(爲了使這個div的margin-left,margin-right屬性) – AdityaSaxena 2012-07-16 08:59:15

0

這段代碼將在一行和其他三列(城市國家和國家)在第二行地址。

<div id="wrapper1"> 
    <div id="container1"> 
     <div id="header1"> 
     </div> 
     <div class="clear"> 
     </div> 
     <div id="centralContainer1"> 
      <div id="mainContainer1"> 
       <div id="contentHolderDiv1" class="contentHolderDiv1"> 
        <div id="searchContainer" class="searchContainer"> 
         <div id="entryValues" class="searchValuesDiv"> 
          <div id="infoDiv"> 

           <div id="address1Div" class="dataLine"> 
            <span class="freeTwoColumnFirstEntry"> 
             Address: 
            </span> 
            <span class="freeTwoColumnSecondEntry"> 
             <span id="detailContentPlaceholder_lblAddress1">Santhom Avenue, 3456</span> 
            </span> 
           </div> 

           <div id="cityStateCountryDiv" class="dataLine"> 
            <span id="cityDiv" class="freeTwoColumnFirstEntry"> 
             City: 
            </span> 
            <span id="cityDivVal" class="freeTwoColumnSecondEntry"> 
             <span id="detailContentPlaceholder_lblCity">Akron</span> 
            </span> 
            <span id="stateDiv" class="freeTwoColumnFirstEntry"> 
             State: 
            </span> 
            <span id="stateDivVal" class="freeTwoColumnSecondEntry"> 
             <span id="detailContentPlaceholder_lblState">OH</span> 
            </span> 
            <span id="countryDiv" class="freeTwoColumnFirstEntry"> 
             Country: 
            </span> 
            <span id="countryDivVal" class="freeTwoColumnSecondEntry"> 
             <span id="detailContentPlaceholder_lblCountry">United States</span> 
            </span> 
           </div> 

          </div> 
         </div> 
        </div> 
        <div class="clear"> 
        </div> 
       </div> 
      </div> 
      <div class="clear"> 
      </div> 
     </div> 
    </div> 
</div>