Hello, I would like to rewrite the table on this page using CSS: http://www.creditservicer.com/pages/chexsystems-help/recommended-banks.php Can anyone show me how to do this, or give me an example I could look at? I would like to add some add some padding within the cells too. Thanks, Steve
To be honest, a table to display that data is perfectly suitable, as it is tabular data. There is not need to design this in CSS as the table serves the purpose pefectly.
Oh ok, thanks. Will keep it as is then. I have my table configured this way, but I can't seem to add padding within the cells for some reason. Any idea why it doesn't let me do this?
Hi That coding (apart from the missing </table>) will allow you to add both cell padding and spacing. What exatly are you trying to achieve?
Well, if you look at the original link I posted, you will notice that there is no padding within the cells, yet I've put a value of 5 the cellpadding attribute.
<table width="100%" border="1"> <tr> <td width="33%" bgcolor="#e0e0e0" padding="5px"> <b>Bank</b> </td> <td width="33%" bgcolor="#e0e0e0" padding="5px"> <b>Location(s)</b> </td> <td width="33%" bgcolor="#e0e0e0" padding="5px"> <b>Online Banking?</b> </td> </tr> Code (markup): Individual cell padding?
Hello, try something like that .content { width: 750px; border: 1px solid #00000; } .column { width: 240px; float:right; background-color: #e0e0e0; padding-left:5px; } Then in your HTML BODY <div class="content"> <div class="column"> <b>Bank</b> </div> <div class="column"> bla bla bla ..... </div> <div class="column"> bla bla bla... </div> </div> This is an example.... Best, Jakomo
You can only set padding for the entire table, in the table tag. You could put tables inside each cell and set those table's padding if you want them different, but doesn't look like you do. I think CSS is the better way to go though, for everything possible, because it loads faster and uses less repetative code. I am an old table layout junkie, but now that I'm getting back to web design, discovering I have to learn to use CSS almost from scratch. There is so much importance placed on it these days. I think of it like event driven programming compared to true object oriented programming though. Takes a little more planning, but pays off with speed and if you ever have to make changes.
I'm not really sure yet, maybe combining tables with css classes to format the tables is best with some things? But definately css should be defining everything. If you know better for sure, just say so