Exempel på design av en tabell

 

 

1 2 3
4 5 6
7 8 9

.tabell1 {
border:10px red solid;
padding:30px;
}
.tabell1 td {
border:5px green dashed;
padding:15px;
}
.tabell1 tr:nth-child(odd) {
background-color:yellow;
}
...
<table class="tabell1">
...

 

 

1 2 3
4 5 6
7 8 9

.tabell2 {
border:1px black solid;
width:200px;
}
.tabell2 td {
border:5px green dashed;
}

...
<table class="tabell2">
...

 

1 2 3
4 5 6
7 8 9

.tabell3 {
margin:auto;
border-width:0px;
width:200px;
height:200px;
}
.tabell3 td {
text-align:center;
}
...
<table class="tabell3">
...