Topic: padding procedure (Page 1 of 1) |
|
---|---|
Nervous Wreck (II) Inmate From: |
posted 10-01-2003 08:28
Hi guys, I've a question about using CSS to apply padding within table cells. |
Paranoid (IV) Mad Scientist From: KC, KS |
posted 10-01-2003 15:08
Why would you want to add padding to a tr? I would think you'd want to do all your formatting inside the td's because that is what is going to contain all your info. |
Maniac (V) Inmate From: out of a sleepy funk |
posted 10-02-2003 00:05
could you show an example? doctype and all that rot? code: table {
|
Nervous Wreck (II) Inmate From: |
posted 10-02-2003 01:24
Well the reason why I wanted to do it in TR's is because I read somewhere taht you should use the least amount of code possible, if I've got 5 columns and 20 rows I don't want to have to right out the class each time for every cell, when I can do it for each tr. |
Lunatic (VI) Mad Scientist From: Massachusetts, USA |
posted 10-02-2003 01:42
With CSS, you can apply styles to hundreds of elements on the page with just one line. For instance, if your table has id="paddingtable", you can use this line of CSS to apply padding to every single cell within it: |
Nervous Wreck (II) Inmate From: |
posted 10-02-2003 07:47
That's the ticket!!! |
Maniac (V) Inmate From: out of a sleepy funk |
posted 10-02-2003 17:25
I thought each row needed different specs? that will apply to every td in the table. I need to read instead of skim maybe, or read mind =) |
Paranoid (IV) Mad Scientist From: KC, KS |
posted 10-02-2003 17:43
Maybe he could use |
Maniac (V) Inmate From: out of a sleepy funk |
posted 10-02-2003 18:38
id's can be used but once per page, they specifically identify a single page element. Works with classes tho. Bitchin. |