2012-06-14 6 views
0

이것은 쉬운 질문이지만 해결할 수없는 것 같습니다.HTML 테이블의 공간

http://jsfiddle.net/Rochefort/kvUKG/

을 또한 여기에 포함 : 내 HTML 테이블은 다음에서 볼 수

<table style="background:#fff;width:300px;margin-left:14px;" class="form"> 
    <tbody> 
     <tr style=""> 
      <td class="bosluk"></td> 
      <td class="alis_baslik"><strong>ALIŞ</strong></td> 
      <td class="satis_baslik"><strong>SATIŞ</strong></td> 
     </tr> 
     <tr style="border-bottom:1px solid #e4e4e4;"> 
      <td class="ikonlar"><strong>$ </strong></td> 
      <td class="kurlar">DOLAR</td> 
      <td class="alis">2.2804</td> 
      <td class="satis">2.2914</td> 
     </tr> 
     <tr style="border-bottom:1px solid #e4e4e4;"> 
      <td class="ikonlar"><strong>$ </strong></td> 
      <td class="kurlar"><strong>DOLAR</strong></td> 
      <td class="alis">2.2804</td> 
      <td class="satis">2.2914</td> 
     </tr> 
     <tr style="border-bottom:1px solid #e4e4e4;"> 
      <td class="ikonlar"><strong>$ </strong></td> 
      <td class="kurlar"><strong>DOLAR</strong></td> 
      <td class="alis">2.2804</td> 
      <td class="satis">2.2914</td> 
     </tr> 
     <tr style="border-bottom:1px solid #e4e4e4;"> 
      <td class="ikonlar"><strong>$ </strong></td> 
      <td class="kurlar"><strong>DOLAR</strong></td> 
      <td class="alis">2.2804</td> 
      <td class="satis">2.2914</td> 
     </tr> 
    </tbody> 
</table> 

나는 CSS를 구현하지만 DOLLAR 항목이 너무 많은 공간이 마련되어 있습니다. 이 여분의 공간을 어떻게 제거 할 수 있습니까?

+0

'padding-right : 112px'를 의미합니까? :/ – casraf

+0

그게 스타일 테스트. – Karmacoma

+0

OhMrBigshot에 동의해야합니다. td 요소에있는 모든 패딩을 제거하고 코드를 정리하십시오. 당신이 직접 만든 빈 반점. 이것이 어떻게 끝까지 보일 것인가에 대한 비전이 있다면 이미지를 추가하여 질문을 업그레이드하십시오. 어쩌면이 방법은 쉬워야합니다 :) –

답변

0

대신 text-align: rightpadding-right을 사용할 수 있습니다.

예 : 전체 열이 좁은 확인하려면 http://jsfiddle.net/BfD2v/

.ikonlar { 
    padding-right:5px; 
    font-family: Arial; 
    font-size:12px; 
    font-weigth: bold; 
    color: #000; 
    text-align: right; 
} 

,이과 열 OD 폭을 설정할 수 있습니다

.bosluk, .ikonlar { 
    width: 10px; 
} 
0

또한 아마에 대한 <th> 태그를 사용한다 헤더. 그런 다음 열은 <td> 태그 아래에 정렬됩니다. Like :

<table border="1"> 
<tr> 
    <th>Month</th> 
    <th>Savings</th> 
</tr> 
<tr> 
    <td>January</td> 
    <td>$100</td> 
</tr> 
<tr> 
    <td>February</td> 
    <td>$80</td> 
</tr> 
</table>