0

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>

6
  • 2
    seems like it works fine. align isn't a valid css property though. Commented Jun 7, 2017 at 17:35
  • @MichaelCoker are you 24/7 on stackoverflow?? loool Commented Jun 7, 2017 at 17:36
  • I made a fiddle and it works fine although @Michael Coker is right. I'm guessing you want to use text-align: center; ? Commented Jun 7, 2017 at 17:38
  • Also, the padding property is wrong; none is not a valid value. And it won't do what you want, since a table has 0 padding to begin with. You probably wanted to assign it to table.sign td instead. Commented Jun 7, 2017 at 17:39
  • 1
    @Samuel Oh, maybe a cached version of the old stylesheet. If that happens, just clear the cache and try again. Commented Jun 7, 2017 at 17:42

1 Answer 1

1

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;
}
Sign up to request clarification or add additional context in comments.

2 Comments

padding: none; not a valid property . You should change it to padding:0; also text-align should be set for td not on table tag
Edited to reflect your comment @Jayakrishnan

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.