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

Status
Not open for further replies.

spookie

Programmer
May 30, 2001
655
IN
hi all,
i want a border to a table without lines for cells .is this possible thru HTML?
thanks in advance
 
You could use CSS to define different styles for the table and the cells:

TD { border: 0px; }
TABLE { border: 3px solid #000000; }

or if you don't want it to apply to all tables and cells just do something like:

.mytable { border: 3px solid #000000; }
.mycell { border: 0px; }

and use it like this:

<TABLE CLASS=&quot;mytable&quot;>
<TR>
<TD CLASS=&quot;mycell&quot;>
...
...
...
 
hi spookie,
well..er...sorry i dont get clearly what u want from the question u have raised..anyway if it is about table without borders then i think u very well know

<table border=0> will solve it...

but if u dont want lines only for the cells inside it but the outerborder should be there means try this code...(may be a bit faulty) Setting the frame attribute for the table tag should get u home

<html>
<head>
<title>doubt clearing </title>
<style>
table
{
border-color:#000000;
}
</style>
</head>
<body>
<table border=1 frame=box cellpadding=0 cellspacing=0>
<tr><Td>one</td><td>two</td></tr>
<tr><td>three</td><td>four</td></tr>
<tr><td>five</td><td>six</td></tr>
</table>
</body>
</html>

 
You can also put the table inside a <div> and set the border-width and border-style for the <div>.
Tracy Dryden
tracy@bydisn.com

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top