CSS and Tables

T

Todd Cary

Can the attributes for a table be specified? In looking through docs,
it appears that attributes like colspacing, colpdding, width and valign
are not for CSS.

Is there a good consolidated Web page that gives all of the CSS attributes?

Many thanks...
 
S

Sid Ismail

: Can the attributes for a table be specified? In looking through docs,
: it appears that attributes like colspacing, colpdding, width and valign
: are not for CSS.
:
: Is there a good consolidated Web page that gives all of the CSS attributes?


But cellspacing and cellpadding work. Use it. And width in the table and
td tags work.

Use CSS when you want special borders, like dotted or dashed lines at the
bottom of TDs only. td {border-bottom: 1px dotted aqua;}

Or beautify the TH with CSS.

Have a look at a simple conversion of an excel sheet:
http://www.sabf.co.za/results/ngbu.html

Sid
 
R

Richard

Todd Cary wrote:>>
Can the attributes for a table be specified? In looking through docs,
it appears that attributes like colspacing, colpdding, width and valign
are not for CSS.
Is there a good consolidated Web page that gives all of the CSS
attributes?
Many thanks...

<table style="your choice here"> Separate each entry with a ; [ semicolon ]
Such as style="color:white ; left:10px.; ".

A better way would be to use <div>.
 
G

Greg Schmidt

: Can the attributes for a table be specified? In looking through docs,
: it appears that attributes like colspacing, colpdding, width and valign
: are not for CSS.

Cell spacing is handled by setting the margin property of td. Cell
padding is handled by setting the padding property of td. There is a
width property that will do what you expect. valign is now the
vertical-align property.
: Is there a good consolidated Web page that gives all of the CSS attributes?

http://www.w3.org/TR/REC-CSS2/ is the standard.

http://hotwired.lycos.com/webmonkey/reference/stylesheet_guide/css_properties.html
is okay but incomplete (vertical-align is missing, for example).

http://devedge.netscape.com/library/xref/2003/css-support/css1/mastergrid.html
may also be helpful to you.
But cellspacing and cellpadding work. Use it. And width in the table and
td tags work.

All of which is using deprecated HTML to perform presentational tasks
better suited to CSS.
Use CSS when you want special borders, like dotted or dashed lines at the
bottom of TDs only. td {border-bottom: 1px dotted aqua;}

No, use CSS for anything presentational.
td {
margin: 1em;
padding: 0.5em;
width: 25%;
vertical-align: top;
border-bottom: 1px dotted aqua;
color: red;
background-color: #eeb;
}

Season to taste.
 
G

Greg Schmidt

: >But cellspacing and cellpadding work. Use it. And width in the table and
: >td tags work.
:
: All of which is using deprecated HTML to perform presentational tasks
: better suited to CSS.


Huh? bgcolor and align are deprecated, yes, and with the admission that
more browsers still support align better than the CSS equivalent.
http://www.htmlhelp.com/reference/html40/tables/table.html
http://www.htmlhelp.com/reference/html40/tables/td.html

Wow, you're right. I checked the spec and those three are not actually
deprecated. I assumed they were, since it seems that everything having
to do solely with presentation has been deprecated in 4.01, and these
clearly lie in that group. That's what I get for not checking the spec
before posting!
 
G

Greg Schmidt

Wow, you're right.

I didn't mean this to sound like I'm surprised that you were right. I
was, rather, surprised that those attributes are not deprecated.
 
S

Sid Ismail

:
: >Wow, you're right.
:
: I didn't mean this to sound like I'm surprised that you were right. I
: was, rather, surprised that those attributes are not deprecated.


Awww, now you took the wind out of my sails... again. LOL

Sid
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top