table background in dreamweaver cs5

True Graphics

New Member
hello, I am using dreamweaver cs5 and i am trying to produce a table with a back ground colour in the
table how do you do it please. thanks
 
CSS;

Code:
table {background-color: #000;}

will give you a black background to all tables on your website. Of course you can also target it using a class or ID.
 
I have a black background on the website already, I just need merge the cells to make a yellow background inside the table please
 
I am trying to do the background colour inside the table only where do I put the coding
for the background color to change the hex value which I am using dreamweaver cs5

<table width="336" height="77" border="1">

<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
</table>
<p>&nbsp;</p>
 
Last edited:
If you can't get your head around basic CSS then try it inline;

Code:
<table width="336" height="77" border="1" style="background-color: #fff;">  
 
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
</table>
 
I am trying to put background colour only for the table where do I put the coding
for table background color only which I am using dreamweaver cs5

<table width="336" height="77" border="1">

<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
</table>
<p>&nbsp;</p>
 
I've just told you and given you two methods.

Do it in the CSS (with either a class or ID if you want to target a specific table) or do it inline as my post above.
 
Back
Top