Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Table Border 2

Status
Not open for further replies.

NetworkGuy101

IS-IT--Management
Aug 13, 2002
482
US
is there anyway to make a table border smaller than 1?
 
The table border attribute is expressed in pixels and since the smallest thing that can be displayed is one pixel, the upfront answer is no.

There's always a better way. The fun is trying to find it!
 
Depends how you are doing it now. If you are specifying border with attribute border="1" in your table declaration, then you can get a thinner one. But you will have to use css for that:
Code:
<style type="text/css">
 table {
  border: 1px solid black;
  border-collapse: collapse;
 }
 
 td {
  border: 1px solid black;
 }
</style>
<table>
 <tr>
  <td>Text</td> 
  <td>Text</td> 
 </tr>
</table>
 
Vragabond,

That's great! I adapted it into a single table's table line because I didn't want the whole doc affected.

Code:
<TABLE width=100 style="border-collapse: collapse; WORD-WRAP: break-word" cellSpacing=0 cellPadding=1 border=1>

Brian
 
Inline stylesheets are messy. Internal stylesheets are extra space. External stylesheets are bliss.

"Ships that pass in the night and speak each other in passing;
Only a signal shown and a distant voice in the darkness;
So on the ocean of life we pass and speak one another,
Only a look and a voice; then darkness again and a silence."
- Henry Wadsworth Longfellow
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top