יום שני, 13 באפריל 2009

12.3 border-spacing

המאפיין border-spacing מאפשר להגדיר את המרחק בין גבולות של אובייקט תא (במודל "גבולות מופרדים").

<html>
<head>
<style type="text/css">
table.one 
{
border-collapse: separate;
border-spacing: 10px
}
table.two
{
border-collapse: separate;
border-spacing: 10px 50px
}
</style>
</head>
<body>
<table class="one" border="1">
  <tr>
    <td>Peter</td>
    <td>Griffin</td>
  </tr>
  <tr>
    <td>Lois</td>
    <td>Griffin</td>
  </tr>
</table>

<table class="two" border="1">
  <tr>
    <td>Cleveland</td>
    <td>Brown</td>
  </tr>
  <tr>
    <td>Glenn</td>
    <td>Quagmire</td>
  </tr>
</table>

</body>
</html>

הקוד יראה כך בדפדפן:



Value

Description

length length

Defines the distance in px, cm, etc. If one length parameter is specified, it defines the horizontal and vertical spacing. If two length parameters are specified, the first sets the horizontal spacing and the second sets the vertical spacing. Lengths may not be negative


 הקודם  הבא  



אין תגובות:

הוסף רשומת תגובה