I have a simple html table element.
<table border="2" cellpadding="5" cellspacing="0" width="40%">
<tr><td> aaa </td><td> bbb </td></tr>
<tr><td> ccc </td><td> ddd </td></tr>
</table>
Now doing my first steps in CSS, I’m try trying to define the latter table style as CSS .
I cannot achieve it – the border looks different whatever I do.
Please help.
My HTML with CSS style :
<style type="text/css">
table.my_class
{
width:40%;
}
table.my_class,table.my_class tr, table.my_class td
{
border-color: black;
border-width: 2px;
border-style:groove;
padding:15px;
border-collapse:collapse;
}
</style>
<table class="my_class">
<tr><td> aaa </td><td> bbb </td></tr>
<tr><td> ccc </td><td> ddd </td></tr>
</table>
HTML
Here is the solution without reset.css
CSS
Here is the solution with reset.css
CSS