• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

table background in dreamweaver cs5


Corrosive

Moderator
Staff member
#2
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.
 
#6
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:

Corrosive

Moderator
Staff member
#7
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>
 
#8
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>
 

Corrosive

Moderator
Staff member
#9
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.