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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Auto-fill table borders? 1

Status
Not open for further replies.

LewisReeder

IS-IT--Management
Jul 18, 2005
38
US
I currently have a fairly large table with many cells. I was wondering if there was a way to auto-fill the borders of each cell rather than using, <td style="border-right-style:dotted; border-right-width:thin; border-left-style:dotted;....(and so on)> for each cell. This is very time consuming, could someone please help me?

Thanks,
Lewis
 
use css to declare a style for that particular HTML element.

Code:
<style type="text/css">
td { 
    border:1px dotted #000;
}   
</style>

Use whatever border settings you wish.
If you like you can be more specific using classes or selectors.

Foamcow Heavy Industries - Web design and ranting
Target Marketing Communications - Advertising, Direct Marketing and Public Relations
I wonder what possesses people to make those animated gifs. Do you just get up in the morning and think, "You know what web design r
 
I am using a stylesheet and I have created the class...

TD.BORDER
{
BORDER-STYLE: dotted;
BORDER-WIDTH: 1px;
BORDER-COLOR: lightgrey;
}

My problem is that for each cell I only what/need 1 dotted line. If I use this class each cell has its own border, causing a double line separation. Overlapping would also be a problem. Is there an easier way to make it more uniform, rather than creating a number of classes to specify left,right,top,bottom borders?
 
Set a style on the table with border-collapse: collapse;


Tracy Dryden

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard. [dragon]
 
Not a different problem, just an additional one. It took both of our posts to do it right.


Tracy Dryden

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

Part and Inventory Search

Sponsor

Back
Top