tables

liunx

Guest
does anyone know of a way to add color and or texture to a tables border?<!--content-->Use CSS. :) <br />
<br />
table { border: 2px solid red }<br />
td { border: 2px dotted green }<br />
<br />
<!-- m --><a class="postlink" href="http://www.w3.org/TR/REC-CSS2/box.html#propdef-border">http://www.w3.org/TR/REC-CSS2/box.html#propdef-border</a><!-- m --><br />
<br />
A texture is harder... you could perhaps use a trick with a conaining table or DIV, add a little padding to it and use a background image. That way the image will show up only in the padding area and look like a border.<!--content-->CSS 3 will have the option to use images for borders.<br />
<br />
Support in current browsers are pretty non exsistant, so this will only help you 3-4 years from now.<br />
<br />
If you need complicated texture borders abusing tables for layout is your only option.<br />
Most not too complex borderlayouts are possible to do using CSS 2 though.<!--content-->
 
Back
Top