Oct 21, 2003 #1 Plato2 Programmer Joined Dec 6, 2002 Messages 192 Location US How to make a stylesheet class that can change a table's cellspacing and cellpadding? Thanks in advance!
How to make a stylesheet class that can change a table's cellspacing and cellpadding? Thanks in advance!
Oct 21, 2003 #2 WizyWyg Technical User Joined Jan 31, 2001 Messages 854 Location JP If you plan on using it more than once: Code: .tdpadding { margin: 1px 2px 3px 4px; padding: 1px 2px 3px 4px; } // padding: (top)px (right)px (bottom)px (left)px change the value for each as needed, if you want all to be same value: Code: .tdpadding { margin: 0px padding: 3px; } This makes it all sides ( top , bottom, left, right ) the same. If you are planning to use it once: Code: #tdpadding { margin: 0px padding: 3px; } [code] Upvote 0 Downvote
If you plan on using it more than once: Code: .tdpadding { margin: 1px 2px 3px 4px; padding: 1px 2px 3px 4px; } // padding: (top)px (right)px (bottom)px (left)px change the value for each as needed, if you want all to be same value: Code: .tdpadding { margin: 0px padding: 3px; } This makes it all sides ( top , bottom, left, right ) the same. If you are planning to use it once: Code: #tdpadding { margin: 0px padding: 3px; } [code]