Click to See Complete Forum and Search --> : Table Question
dabreegster
03-29-2003, 09:34 AM
I have an HTML site and I'm absoultely tired of writing:
<TABLE BORDERCOLOR="BLUE" BORDERCOLORLIGHT="BLUE" BORDERCOLORDARK="BLUE" WIDTH="100%" CELLPADDING="3" CELLSPACING="5" BORDER="3">
every time I want a table. Is it possible to use Stylesheets to define Table borders, cellpadding/spacing, bordercolor ect.? If so, how?
nkaisare
03-29-2003, 01:04 PM
http://www.w3schools.com/css/css_reference.asp#border
These borders styles can be applied to any element: table, td, div, p, span, etc.
dabreegster
03-29-2003, 09:16 PM
Yeah, but how can I set the rest of the values?
spufi
03-30-2003, 08:50 PM
Well, each of your border colors are blue, so I didn't see any difference with just using "border:3px solid blue;" You can add the width into your CSS and that just leaves cellpadding and cellspacing. You could just make a generic table with the smaller amount of code used and the just copy/paste it where you need it. That's pretty much what I do. No need to reinvent the wheel every time you need one.
jdavia
03-30-2003, 09:06 PM
Originally posted by dabreegster
If you had the right Editor, you can have it set to the default new table. Then everytime you need a table, you only need to set the amount of rows and columns.
dabreegster
03-31-2003, 06:26 PM
I know, but I absolutely just HATE messy code. Drives me nuts!
jdavia
03-31-2003, 09:16 PM
Originally posted by dabreegster
I know, but I absolutely just HATE messy code. Drives me nuts!
You might be thinking of WYSIWYG editors for messy code. Try downloading a free "CareWare" editor called Arachnophilia. You do the coding, it does the work with the minimum code. Do a search for it.