views:

44

answers:

4

I have some tables in my asp.net mvc application for layout purposes. Even though I usually use divs for most things, in some cases tables make most sense because they already have exactly the layout I'm after in these cases.

The only problem is, as far as I know the borders are supposed to be invisible unless you specify a width and style for the borders. But they aren't... They are rather vague, yes, but there are still light blue borders around each cell. What is that and how do I get rid of them? (Funny thing is I don't remember having seen this before when I used tables, which was a while ago).

I also tried specifically setting the border to 0px on both table and td, but that didn't work either...

+1  A: 

Have you tried border: none for CSS or border='0' in the table declaration?

Robert
+1  A: 

The CSS property border-collapse is used to achieve this effect. It will make adjacent cells share the same border. This property has the same end effect as the depricated cellspacing attribute for tables.

table { border-collapse: collapse; }
wsanville
+1  A: 

You can use cellspacing attribute in table tag

<table cellspacing='0' border='0'>
Ricky Dang
A: 

Well, it turns out it was just a mistake on my part, the css selector wasn't accurate enough. I don't know why, but it didn't work just saying td{border:none;}, I had to specify table tr td{border:none;}, and then it worked...

Anders Svensson