Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > hiding table cell border

Reply
Thread Tools

hiding table cell border

 
 
richard
Guest
Posts: n/a
 
      07-12-2008
I am attempting to create a table layout and I want to NOT have the
borders show in a particular group of cells in that column.

If I use border-bottom-style:none/hidden I still wind up with a border
showing.

Assuming I have 6 rows, 6 columns.
Row 1, col 2 will have a bottom border.
Row 2, col2, no border.
Row 3, col 2 no border.
Row 4, col 2 no border.
Row 5, col 2 no border.
Row 6, col 2 border.

All other cells have full borders.

In divisions, I could easily do this but my data is better suited for
tables. As you know, there are basically TWO borders per cell in a
table.

So how do you go about NOT showing both borders?
 
Reply With Quote
 
 
 
 
richard
Guest
Posts: n/a
 
      07-12-2008
On Sat, 12 Jul 2008 10:00:39 -0400, richard <(E-Mail Removed)>
wrote:

>I am attempting to create a table layout and I want to NOT have the
>borders show in a particular group of cells in that column.
>
>If I use border-bottom-style:none/hidden I still wind up with a border
>showing.
>
>Assuming I have 6 rows, 6 columns.
>Row 1, col 2 will have a bottom border.
>Row 2, col2, no border.
>Row 3, col 2 no border.
>Row 4, col 2 no border.
>Row 5, col 2 no border.
>Row 6, col 2 border.
>
>All other cells have full borders.
>
>In divisions, I could easily do this but my data is better suited for
>tables. As you know, there are basically TWO borders per cell in a
>table.
>
>So how do you go about NOT showing both borders?


I did find one way of using two classes hiding the top and bottom
borders as needed but there should be a simpler way.
 
Reply With Quote
 
 
 
 
Jukka K. Korpela
Guest
Posts: n/a
 
      07-12-2008
Scripsit richard:

> I am attempting to create a table layout and I want to NOT have the
> borders show in a particular group of cells in that column.


URL?

> If I use border-bottom-style:none/hidden I still wind up with a border
> showing.


URL?

> Assuming I have 6 rows, 6 columns.
> Row 1, col 2 will have a bottom border.
> Row 2, col2, no border.
> Row 3, col 2 no border.
> Row 4, col 2 no border.
> Row 5, col 2 no border.
> Row 6, col 2 border.
>
> All other cells have full borders.


URL? A URL would let us see, among other things, exactly what you have
tried and how the "Row 6, col 2 border." line is to be read - did you
omit "no", or do you mean it should have all borders? Assuming the
latter (since the former would be easier, just leave out the last rule
below), this would do the job:

td { border: solid red 1px; } /* or something like that */
tr:first-child td:first-child + td { border-style: none none solid
none; }
td:first-child + td { border-style: none; }
tr:first-child + tr + tr + tr + tr + tr td:first-child + td
{ border-style: solid; }

As usual, IE does not support this except from version 7 onwards in
"standards" mode. If you wish to produce the effect on older versions of
6, use classes.

(This is a bit tricky. My first attempt used just border: none in the
3rd rule. It is instructive to work out why that would be wrong. Hint:
shortcuts cut your shorts!)

> As you know, there are basically TWO borders per cell in a
> table.


Huh? There are FOUR borders (up, right, bottom, left).

> So how do you go about NOT showing both borders?


We need to understand what you mean by TWO borders.

Maybe you mean that you have border-collapse: collapse. That would be a
different story entirely, but it does not mean that a cell has two
borders. It just means that borders "collapse" in particular way. A URL
would have revealed whether this was your _real_ probem.

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/

 
Reply With Quote
 
richard
Guest
Posts: n/a
 
      07-14-2008
On Sun, 13 Jul 2008 17:14:47 +0100, Martin Jay
<(E-Mail Removed)> wrote:

>On Sat, 12 Jul 2008 10:00:39 -0400, richard <(E-Mail Removed)>
>wrote:
>
>>I am attempting to create a table layout and I want to NOT have the
>>borders show in a particular group of cells in that column.
>>
>>If I use border-bottom-style:none/hidden I still wind up with a border
>>showing.
>>
>>Assuming I have 6 rows, 6 columns.
>>Row 1, col 2 will have a bottom border.
>>Row 2, col2, no border.
>>Row 3, col 2 no border.
>>Row 4, col 2 no border.
>>Row 5, col 2 no border.
>>Row 6, col 2 border.
>>
>>All other cells have full borders.

>
>Something like this?
>
><http://www.spam-free.org.uk/examples/table_borders.html>


Close. Thanks. Tried out a few combinations and then decided to change
the format altogether.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
border-color: #003366; border-width: 2px; =?UTF-8?B?TWFydGluIFDDtnBwaW5n?= HTML 64 07-30-2006 04:01 PM
Drop Down List Border Width vs Text Box Border Width Coder ASP .Net 1 06-24-2006 01:27 PM
row bottom border in inner table not matching up with row border in outer table phl HTML 1 06-08-2006 03:43 PM
No table border for blank cell Doug ASP General 3 09-05-2005 07:02 PM
Datagrid Border showing when I say no border tshad ASP .Net 0 01-31-2005 05:40 PM



Advertisments