2012-02-13 123 views
1

我有以下幾點:HTML表格邊框

 <table class="floatleft" style="margin-right:1em;margin-bottom:1em;border:4px;"> 

雖然我圍着桌子邊框,無邊框顯示出來。任何想法?

回答

3

您指定border: 4px這意味着相同的:

border-width: 4px; 
border-style: none; 
border-color: <the value of the 'color' property>; 

...因爲unspecified values take their initial value速記語法。

明確顯示樣式和顏色:

border: 4px solid black; 

(或至少在風格,因爲none將停止任何邊界可見)。

1

可能因爲您有一個白色背景並且您沒有設置邊框樣式和顏色。嘗試:

<table class="floatleft" style="margin-right:1em;margin-bottom:1em;border:4px solid red;"> 
    <tr><td>Hello</td></tr>  
</table> 
​ 

http://jsfiddle.net/karim79/qWLvf/