![]() |
![]() |
Home Page
Tips page
University Page
Programming
Debian & Linux
Some works
About me
Del.icio.us Bookmarks
BOINC Combined Statistics
Site Statistics
Contact me sending an e-mail (antispam defense activated)



|
![]() |
![]() |
![]() |
Title: Table with thin borders
Author: Sandro Tosi
Last modified: 2005-09-05
Did you ever need a table with very thin borders? Yes, I think it
happened. But everyone knows that border=1 does define a rather strong
border; so, what to do? Learn from Google!
Surfing the Google web-pages, I've found a very nice small table, with
thin border, and so I copied their code. Below you'll find a short
example of how to do:
<html>
<body>
<table width="90%" border="0" align="center" cellpadding="1">
<tr>
<td bgcolor="black">
<table width="100%" cellspacing="0" cellpadding="5">
<tr>
<td bgcolor="ffffff">
Somethings
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
Simple, isn't it? Two nested tables: the first with no border, a
cellpad of 1 and the only cell background set to the color to use for
the thin border; the latter table will hold the data and is sized 100%
of the space an no cell space. This way, you can have a nice
thin-bordered table.
Ok ok, I've been kidding... :) This is the easiest way to create a
table with thin borders:
<table style="1px solid #000000;">
<tr>
<td>table with thin borders</td>
</tr>
</table> |