Samuel
Samuel

Reputation: 11

Table class not working in css / html

Trying to add a table into the footer of a webpage, and this specific table needs to be 100% wide, black background. Have coded the css and html as below, and doesn't seem to recognise it at all. Anyone know where I'm going wrong?

table.sign {
    width:100%; 
    background-color: rgba(0,0,0,0.6);
    align:center;
    border: none;
    padding: none;
}
<table class="sign">
  <tr>
    <td>
      <b>Content will go here.</b>
    </td>
  </tr>
</table>

Upvotes: 0

Views: 4505

Answers (1)

Vinagy
Vinagy

Reputation: 159

Try using text-align: center; on the td instead of the table

table.sign {
    width:100%; 
    background-color: rgba(0,0,0,0.6);
    border: none;
    padding: 0;
}
td {
    text-align: center;
}

Upvotes: 1

Related Questions