>> English << | česky | PortuguêsZVON > Tutorials > CSS2 tutorial
>> Example 47 << | Prev | Next | Index | Contents

In the separate border model properties border-spacing (to specify distance betweeen individual borders) and empty-cells (if borders around empty cells should be shown) can be used.

XML SourceCSS stylesheetExample link
(1)
     <AAA>
          <BBB>
               <CCC>ccc</CCC>
               <DDD>ddd</DDD>
               <EEE>eee</EEE>
          </BBB>
          <BBB>
               <CCC>ccc</CCC>
               <DDD></DDD>
               <EEE>eee</EEE>
          </BBB>
          <BBB>
               <CCC>ccc</CCC>
               <DDD>ddd</DDD>
               <EEE></EEE>
          </BBB>
     </AAA>

* {padding:1ex; border:solid}
AAA {display: table; border-collapse:separate; border-spacing:12px}
BBB {display: table-row;}
CCC {display: table-cell;}
DDD {display: table-cell;}
EEE {display: table-cell;}
View output
XML SourceCSS stylesheetExample link
(2)
     <AAA>
          <BBB>
               <CCC>ccc</CCC>
               <DDD>ddd</DDD>
               <EEE>eee</EEE>
          </BBB>
          <BBB>
               <CCC>ccc</CCC>
               <DDD></DDD>
               <EEE>eee</EEE>
          </BBB>
          <BBB>
               <CCC>ccc</CCC>
               <DDD>ddd</DDD>
               <EEE></EEE>
          </BBB>
     </AAA>

* {padding:1ex; border:solid}
AAA {display: table; border-collapse:separate; empty-cells:show}
BBB {display: table-row;}
CCC {display: table-cell;}
DDD {display: table-cell;}
EEE {display: table-cell;}
View output
XML SourceCSS stylesheetExample link
(3)
     <AAA>
          <BBB>
               <CCC>ccc</CCC>
               <DDD>ddd</DDD>
               <EEE>eee</EEE>
          </BBB>
          <BBB>
               <CCC>ccc</CCC>
               <DDD></DDD>
               <EEE>eee</EEE>
          </BBB>
          <BBB>
               <CCC>ccc</CCC>
               <DDD>ddd</DDD>
               <EEE></EEE>
          </BBB>
     </AAA>

* {padding:1ex; border:solid}
AAA {display: table; border-collapse:separate; empty-cells:hide}
BBB {display: table-row;}
CCC {display: table-cell;}
DDD {display: table-cell;}
EEE {display: table-cell;}
View output