Quantcast
Channel: AjaxControlToolkit Work Item Rss Feed
Viewing all articles
Browse latest Browse all 4356

Created Issue: Table Border/CellPadding/CellSpacing - Replace with CSS [27075]

$
0
0
The table attributes border, cellpadding and cellspacing are now considered obsolete in HTML 5 standards and result in failed validation against services such as the W3C Markup Validator service when using HTML 5 document types. It has been recommended to use CSS styles prior to HTML 5, but still validates in the older standards. These attributes should be replaced with their CSS style counter-parts.

The border attribute should be replaced by the border style for the table or cell elements. For example, take a table with a CSS class defined of 'thetable':
.thetable { border: 0; }

Cellpadding attribute should be replaced by the padding style, and the cellspacing attribute should be replaced by the border-spacing style for cell elements. For example, take a table with a CSS class defined of 'thetable', and you want a cellpadding of 2 and a cellspacing of 0:
.theTable th, td { padding: 2px; border-spacing: 0; }

Doing this also has the added bonus of allowing these attributes to be changed using different style sheets.

Viewing all articles
Browse latest Browse all 4356

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>