Solved

Annoying double border

Posted on 2006-07-10
4
279 Views
Last Modified: 2006-11-18
Hi,

In an asp:table I need cells to be enclosed within a thin 1px black line.

When I set the BorderStyle="Solid" and borderwidth="1px", wether this is for tableroxw or each cell, the table then appear with 1 border per each cell, thus drawing some sort of double separation lines.

How to make this look like a 'normal' grid?
0
Comment
Question by:frSurfer
4 Comments
 
LVL 13

Expert Comment

by:PraxisWeb
ID: 17074573
Set your cellspacing to 0
0
 

Expert Comment

by:flalar
ID: 17074681
you can control this using  the cellpadding and cellspacing attributes. Try setting these to  cellpadding="0" and cellspacing="0"... probably what you're after
0
 
LVL 28

Accepted Solution

by:
gamebits earned 125 total points
ID: 17075261
Not the cellpadding, cellpadding is for how space you want inside the cell (how far the text would be from the border).

cellspacing is the one you need to set to 0 like PraxisWeb has already point out, cellspacing dictate how much space between the cell, by default the table has a border and a cellspacing.

Gamebits
0
 
LVL 2

Expert Comment

by:dognamedmoses
ID: 17086222
double separation lines may be coming due to a table declaration in your .css document.  if there is one, you need to find it and add

{
  table-collapse: collapsed;
}

also if the css has any border declarations, make sure they are only under the "td" tag and not tr.

finally as mentioned before try cellspacing=0, but even if it's set to 1 it shouldn't double up the border.

good luck.
0

Featured Post

Guide to Performance: Optimization & Monitoring

Nowadays, monitoring is a mixture of tools, systems, and codes—making it a very complex process. And with this complexity, comes variables for failure. Get DZone’s new Guide to Performance to learn how to proactively find these variables and solve them before a disruption occurs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
There’s a good reason for why it’s called a homepage – it closely resembles that of a physical house and the only real difference is that it’s online. Your website’s homepage is where people come to visit you. It’s the family room of your website wh…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

679 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question