HTML/CSS/CSS Attributes and Javascript Style Properties/border spacing

Материал из Web эксперт
Перейти к: навигация, поиск

border-spacing: 15px

   <source lang="html4strict">

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"

                     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">

   <head>
       <title>border-spacing</title>
       <style rel="stylesheet" type="text/css">

table {

   border: 1px solid rgb(200, 200, 200);
   caption-side: bottom;
   width: 100%;
   table-layout: fixed;
   border-spacing: 15px;

} th {

   background: lightyellow;

} th, td {

   border: 1px solid rgb(200, 200, 200);
   padding: 5px;
   overflow: hidden;

}

       </style>
   </head>
   <body>
<colgroup> <col/> <col/> <col/> </colgroup> <thead> </thead> <tbody> </tbody>
My favorite records.
Column 1Colunm 2Column 3
R A 1965
B V 1967
M T 1995
   </body>

</html>

</source>
   
  


border-spacing: 15px 0

   <source lang="html4strict">

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"

                     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">

   <head>
       <title></title>
       <style rel="stylesheet" type="text/css">

body {

   font-family: sans-serif;

} table {

   border: 1px solid rgb(200, 200, 200);
   caption-side: bottom;
   width: 100%;
   table-layout: fixed;
   border-spacing: 15px 0;

} th {

   background: lightyellow;

} th, td {

   border: 1px solid rgb(200, 200, 200);
   padding: 5px;
   overflow: hidden;

}

       </style>
   </head>
   <body>
<colgroup> <col/> <col/> <col/> </colgroup> <thead> </thead> <tbody> </tbody>
This is a test.
Column 1Colunm 2Column 3
R A 1965
B V 1967
M T 1995
   </body>

</html>

</source>