Syndicate content

cellpadding="..." and cellspacing="..." not working

Today I was trying to create a table in a post and just could not get the cell padding I wanted. Without the padding the data is all cramped together which did not look the way I wanted (see Alexis Wilke Accounts.)

I knew I had the following entry in my CSS but did not think it was stronger than the table cellpadding and cellspacing specifications because I thought it worked for me before!

* {
  margin: 0;
  padding: 0;
}

I was wrong, that definition applies to the td with a greater constrained. So I had to add another entry. I solved the problem using a td definition like this:

table.user-table td {
  padding: 5px;
}

This is of course defined after the previous definition so it is effective last. The only problem with this is that I need to add the "user-table" class to my table definition:

<table class="user-table">...</table>

and it's "hard coded" in the CSS file instead of each individual page. None the less, it works!

Syndicate content

Diverse Realty

Diverse Realty Team

Want a New Home?
Want to Sell Your House?

Call Alex at
+1 (916)
220 6482

Alexis Wilke, Realtor
Salesperson
Lic. # 02024063

Cory Marcus, Broker
Lic. # 01079165

     

Terms of Site Index

Find the page/content you are looking for with our index.

  • Debian

    A Linux distribution borned in Germany. Debian is well known for not accepting any software that have a "dodge" license. They will always make sure that the license is 100% like GPL, BSD, MIT, etc. an Open Source license.

  • backup
  • bash
  • form
  • list