Copy link to clipboard
Copied
I have been given a large table to insert onto a website,
However I need to colour in certain cells and place borders around certain groups of cells.
I've tried this in Visual Studio2013 and also in DW CS6 but there seems to be no easy way to highlight the cells and colour these in as desired in any sort of WYSIWYG format.
Is this possible in CS6 or should I look elsewhere.
Thanks in advance for any feedback.
Terry
Easy is a relative term. If you understand HTML & CSS classes, tables are easy to style.
Example table:
<table>
<tr>
<td>something here</td>
<td>something here</td>
<td>something here</td>
</tr>
<tr>
<td class="green">This cell is styled with green</td>
<td>something here</td>
<td class="red">This cell is styled with red</td>
</tr>
</table.
CSS
table { border: 2px solid black;}
td {border: 1px dotted silver}
/**Zebra Stripes**/
tr:n
...Copy link to clipboard
Copied
It sounds like you are looking for some sort of solution like Excel to just go cell by cell and color/style things. While it's not pretty (and likely not responsive if you need mobile friendly), you could export Excel HTML. However, ideally, it's recommended you use CSS to style your cells and if you have large tables of data, figure out a way to potentially pull that data directly from a database to make styling easier. Otherwise, it can be a bit tedious to define your needed styles and then go to the proper areas to assign the classes to the table.
Alternatively, if this is something that is to be distributed, I would just consider making your stylized table a PDF document that a visitor can grab from your website.
Copy link to clipboard
Copied
Easy is a relative term. If you understand HTML & CSS classes, tables are easy to style.
Example table:
<table>
<tr>
<td>something here</td>
<td>something here</td>
<td>something here</td>
</tr>
<tr>
<td class="green">This cell is styled with green</td>
<td>something here</td>
<td class="red">This cell is styled with red</td>
</tr>
</table.
CSS
table { border: 2px solid black;}
td {border: 1px dotted silver}
/**Zebra Stripes**/
tr:nth-child(even) /**every even row**/
{background-color: #F1F1F1;}
tr:nth-child(odd) /**every odd row**/
{background-color: #ECE7CA;}
/**Special Classes**/
.red {background: pink; border: 1px solid red}
.green {background: yellowgreen; border: 1px solid darkgreen}
Nancy