Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 292
  • Last Modified:

Annoying double border

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
frSurfer
Asked:
frSurfer
1 Solution
 
PraxisWebCommented:
Set your cellspacing to 0
0
 
flalarCommented:
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
 
gamebitsCommented:
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
 
dognamedmosesCommented:
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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now