473,385 Members | 1,863 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

border around tr

I've a table.

The table must not have any border.
The TR (every line) must have a border, but not the lines between cells.
The TR.pages must have no border.

so .mytable{border:0px;}

..mytable tr{border:1px solid #000000;}
..mytable th{border:0px;}
..mytable tr.pages {border:0px;}

doesn't work, can't have the border around tr. The table has no border at
all.

may this work ?

bob

Jul 21 '05 #1
23 52074
Bob Bedford wrote:
I've a table.

The table must not have any border.
The TR (every line) must have a border, but not the lines between cells.
The TR.pages must have no border.

so .mytable{border:0px;}

.mytable tr{border:1px solid #000000;}
.mytable th{border:0px;}
.mytable tr.pages {border:0px;}

doesn't work, can't have the border around tr. The table has no border
at all.

may this work ?

bob

td {
border-top: 1px solid black;
border-bottom: 1px solid black;
}
Jul 21 '05 #2
> td {
border-top: 1px solid black;
border-bottom: 1px solid black;
}

______________________________
cell1 cell2 cell3 .... cellX
______________________________

And what about left and right ???? cell1 has no left line, and cellX either,
no right line.
Jul 21 '05 #3
> td {
border-top: 1px solid black;
border-bottom: 1px solid black;
}


or maybe it's possible to draw a line around an entire table, but no line
around the last one (it's what I'm trying to do)
I've all my table centered in the page, but I don't want the content of the
last cell outside the table (as the result is awfull). I'd like to remove
the border around the last line.
Jul 21 '05 #4
Els
Bob Bedford wrote:
td {
border-top: 1px solid black;
border-bottom: 1px solid black;
}
or maybe it's possible to draw a line around an entire
table, but no line around the last one (it's what I'm
trying to do)


The last what? table? tr?
I've all my table centered in the page, but I
don't want the content of the last cell outside the table
(as the result is awfull). I'd like to remove the border
around the last line.


Not sure if I'm following, but maybe you're after something
like this?

table,td{
border-style:solid;
border-color:black;
}
table{
border-width:1px 1px 0 1px;
}
td{
border-width:0 0 1px 0;
}

--
Els
http://locusmeus.com/
Sonhos vem. Sonhos vão. O resto é imperfeito.
- Renato Russo -
Jul 21 '05 #5
>> or maybe it's possible to draw a line around an entire
table, but no line around the last one (it's what I'm
trying to do)


The last what? table? tr?


Sorry, around the last TR. The last TR should not have a border.
I've all my table centered in the page, but I
don't want the content of the last cell outside the table
(as the result is awfull). I'd like to remove the border
around the last line.


Not sure if I'm following, but maybe you're after something
like this?

table,td{
border-style:solid;
border-color:black;
}
table{
border-width:1px 1px 0 1px;
}
td{
border-width:0 0 1px 0;
}

The last row in this case has the left and right border. I want to avoid
this.
Jul 21 '05 #6
"Bob Bedford" <be******@notforspammershotmail.com> wrote:
I've a table.

The table must not have any border.
The TR (every line) must have a border, but not the lines between cells.
The TR.pages must have no border.
That's as clear as mud.
so .mytable{border:0px;}

.mytable tr{border:1px solid #000000;}
.mytable th{border:0px;}
.mytable tr.pages {border:0px;}

doesn't work, can't have the border around tr. The table has no border at
all.
Although tr's affect rendering, they are themselves not rendered, thus
they cannot be styled.
may this work ?


A stab in the dark at what you may be trying to do:
http://homepage.ntlworld.com/spartanicus/tr_border.htm

Note that for this to produce a seamless border the cellspacing has to
be null.

--
Spartanicus
Jul 21 '05 #7
saz
In article <42**********************@news.sunrise.ch>, bedford1
@notforspammershotmail.com says...
or maybe it's possible to draw a line around an entire
table, but no line around the last one (it's what I'm
trying to do)


The last what? table? tr?


Sorry, around the last TR. The last TR should not have a border.
I've all my table centered in the page, but I
don't want the content of the last cell outside the table
(as the result is awfull). I'd like to remove the border
around the last line.


Not sure if I'm following, but maybe you're after something
like this?

table,td{
border-style:solid;
border-color:black;
}
table{
border-width:1px 1px 0 1px;
}
td{
border-width:0 0 1px 0;
}

The last row in this case has the left and right border. I want to avoid
this.

Then create a class specifically for the last rows of td, and set the
borders the way you want it.

td.bottom {
border-width:0 0 0 0
}
Jul 21 '05 #8
Els
saz wrote:
In article <42**********************@news.sunrise.ch>,
bedford1 @notforspammershotmail.com says...
>> or maybe it's possible to draw a line around an entire
>> table, but no line around the last one (it's what I'm
>> trying to do)
>
> The last what? table? tr?


Sorry, around the last TR. The last TR should not have a
border.
Okay, understand that now.
> table,td{
> border-style:solid;
> border-color:black;
> }
> table{
> border-width:1px 1px 0 1px;
> }
> td{
> border-width:0 0 1px 0;
> }


The last row in this case has the left and right border. I
want to avoid this.


Then create a class specifically for the last rows of td,
and set the borders the way you want it.

td.bottom {
border-width:0 0 0 0
}


No, he then still has the borders on the table which include
the last row.

He'll need to give the first and last column of td's a class,
except for the ones in the last row.
Taking class foo for the left td's and class bar for the right
ones, you'd get something like this:

td{border-top:1px solid black;}
td.foo{border-left:1px solid black;}
td.bar{border-right:1px solid black;}

--
Els
http://locusmeus.com/
Sonhos vem. Sonhos vão. O resto é imperfeito.
- Renato Russo -
Jul 21 '05 #9

"Spartanicus" <me@privacy.net> a écrit dans le message de news:
e3********************************@n...utvinternet.ie...
"Bob Bedford" <be******@notforspammershotmail.com> wrote:
I've a table.

The table must not have any border.
The TR (every line) must have a border, but not the lines between cells.
The TR.pages must have no border.
That's as clear as mud.
so .mytable{border:0px;}

.mytable tr{border:1px solid #000000;}
.mytable th{border:0px;}
.mytable tr.pages {border:0px;}

doesn't work, can't have the border around tr. The table has no border at
all.


Although tr's affect rendering, they are themselves not rendered, thus
they cannot be styled.

OK
A stab in the dark at what you may be trying to do:
http://homepage.ntlworld.com/spartanicus/tr_border.htm


Ok, now add a third line: the new created one must have no border on left
bottom and right.

Bob
Jul 21 '05 #10
"Bob Bedford" <be******@notforspammershotmail.com> wrote:
A stab in the dark at what you may be trying to do:
http://homepage.ntlworld.com/spartanicus/tr_border.htm


Ok, now add a third line: the new created one must have no border on left
bottom and right.


Still clear as mud, upload a graphic that demonstrates what you want.

--
Spartanicus
Jul 21 '05 #11

"Spartanicus" <me@privacy.net> a écrit dans le message de news:
sg********************************@n...utvinternet.ie...
"Bob Bedford" <be******@notforspammershotmail.com> wrote:
A stab in the dark at what you may be trying to do:
http://homepage.ntlworld.com/spartanicus/tr_border.htm


Ok, now add a third line: the new created one must have no border on left
bottom and right.


Still clear as mud, upload a graphic that demonstrates what you want.


----------------------
| foo foo foo foo foo |
----------------------
| foo foo foo foo foo |
----------------------
bar bar bar bar bar
The last line contain datas differents than foo (actually a grid for
changing pages < 1 2 3 4 5.....) and I don't want a border around.
that's why I wanted control on TR, in order to put a border aroud (aroud
foo) but not around bar

hope it's clear !
Jul 21 '05 #12
Bob Bedford wrote:

"Spartanicus" <me@privacy.net> a écrit dans le message de news:
sg********************************@n...utvinternet.ie...
"Bob Bedford" <be******@notforspammershotmail.com> wrote:
A stab in the dark at what you may be trying to do:
http://homepage.ntlworld.com/spartanicus/tr_border.htm
Ok, now add a third line: the new created one must have no border on
left
bottom and right.

Still clear as mud, upload a graphic that demonstrates what you want.

----------------------
| foo foo foo foo foo |
----------------------
| foo foo foo foo foo |
----------------------
bar bar bar bar bar
The last line contain datas differents than foo (actually a grid for
changing pages < 1 2 3 4 5.....) and I don't want a border around.
that's why I wanted control on TR, in order to put a border aroud (aroud
foo) but not around bar

hope it's clear !


td.foo_left {
border-left: 1px solid black;
border-top: 1px solid black;
border-bottom: 1px solid black;
}
td.foo_middle {
border-top: 1px solid black;
border-bottom: 1px solid black;
}
td.foo_right {
border-right: 1px solid black;
border-top: 1px solid black;
border-bottom: 1px solid black;
}
td.bar {
border: none;
}

<td class=foo_left ...
<td class=foo_middle ...
<td class=foo_right ...
<td class=bar ...

i am simply amazed that with the information given you couldnt figure
this one out yourself

gl

martin
Jul 21 '05 #13
Bob Bedford wrote:

"Spartanicus" <me@privacy.net> a écrit dans le message de news:
sg********************************@n...utvinternet.ie...
"Bob Bedford" <be******@notforspammershotmail.com> wrote:
A stab in the dark at what you may be trying to do:
http://homepage.ntlworld.com/spartanicus/tr_border.htm
Ok, now add a third line: the new created one must have no border on
left
bottom and right.

Still clear as mud, upload a graphic that demonstrates what you want.

----------------------
| foo foo foo foo foo |
----------------------
| foo foo foo foo foo |
----------------------
bar bar bar bar bar
The last line contain datas differents than foo (actually a grid for
changing pages < 1 2 3 4 5.....) and I don't want a border around.
that's why I wanted control on TR, in order to put a border aroud (aroud
foo) but not around bar

hope it's clear !


td {
border: 1px solid black;
}
td.foo_middle {
border-left: none;
border-right: none;
}
td.bar {
border-left: none;
border-right: none;
border-bottom: none;
}

or maybe more elegant

td.foo_left {
border-left: 1px solid black;
border-top: 1px solid black;
border-bottom: 1px solid black;
}
td.foo_middle {
border-top: 1px solid black;
border-bottom: 1px solid black;
}
td.foo_right {
border-right: 1px solid black;
border-top: 1px solid black;
border-bottom: 1px solid black;
}
td.bar {
border-left: none;
border-right: none;
border-bottom: none;
}

enough to play with
Jul 21 '05 #14
saz
In article <Xn*****************@130.133.1.4>, el*********@tiscali.nl
says...
saz wrote:
In article <42**********************@news.sunrise.ch>,
bedford1 @notforspammershotmail.com says...
>> or maybe it's possible to draw a line around an entire
>> table, but no line around the last one (it's what I'm
>> trying to do)
>
> The last what? table? tr?

Sorry, around the last TR. The last TR should not have a
border.
Okay, understand that now.
table,td{
> border-style:solid;
> border-color:black;
> }
> table{
> border-width:1px 1px 0 1px;
> }
> td{
> border-width:0 0 1px 0;
> }

The last row in this case has the left and right border. I
want to avoid this.


Then create a class specifically for the last rows of td,
and set the borders the way you want it.

td.bottom {
border-width:0 0 0 0
}


No, he then still has the borders on the table which include
the last row.

He'll need to give the first and last column of td's a class,
except for the ones in the last row.
Taking class foo for the left td's and class bar for the right
ones, you'd get something like this:

td{border-top:1px solid black;}
td.foo{border-left:1px solid black;}
td.bar{border-right:1px solid black;}

I'm confused, and I give up. I have no idea what he is trying to
accomplish, nor do I care.

To the OP: buy a decent CSS book.
Jul 21 '05 #15
Els
Martin! wrote:
Bob Bedford wrote:

"Spartanicus" <me@privacy.net> a écrit dans le message de
news:
sg********************************@n...tanicu s.utvinte
rnet.ie...
"Bob Bedford" <be******@notforspammershotmail.com> wrote:

> A stab in the dark at what you may be trying to do:
> http://homepage.ntlworld.com/spartanicus/tr_border.htm
Ok, now add a third line: the new created one must have
no border on left
bottom and right.
Still clear as mud, upload a graphic that demonstrates
what you want.

----------------------
| foo foo foo foo foo |
----------------------
| foo foo foo foo foo |
----------------------
bar bar bar bar bar
The last line contain datas differents than foo (actually
a grid for changing pages < 1 2 3 4 5.....) and I don't
want a border around. that's why I wanted control on TR,
in order to put a border aroud (aroud foo) but not around
bar

hope it's clear !


td {
border: 1px solid black;
}
td.foo_middle {
border-left: none;
border-right: none;
}
td.bar {
border-left: none;
border-right: none;
border-bottom: none;
}

or maybe more elegant

td.foo_left {
border-left: 1px solid black;
border-top: 1px solid black;
border-bottom: 1px solid black;
}
td.foo_middle {
border-top: 1px solid black;
border-bottom: 1px solid black;
}
td.foo_right {
border-right: 1px solid black;
border-top: 1px solid black;
border-bottom: 1px solid black;
}
td.bar {
border-left: none;
border-right: none;
border-bottom: none;
}

enough to play with


(kan toch korter ;-) )

td{border-top:1px solid black;}
td.foo_left{border-left:1px solid black;}
td.foo_right{border-right:1px solid black;}

--
Els
http://locusmeus.com/
Sonhos vem. Sonhos vão. O resto é imperfeito.
- Renato Russo -
Jul 21 '05 #16
"Bob Bedford" <be******@notforspammershotmail.com> wrote:
http://homepage.ntlworld.com/spartanicus/tr_border.htm

Ok, now add a third line: the new created one must have no border on left
bottom and right.


Still clear as mud, upload a graphic that demonstrates what you want.


----------------------
| foo foo foo foo foo |
----------------------
| foo foo foo foo foo |
----------------------
bar bar bar bar bar


You could easily have done that slight modification yourself, example is
updated.

--
Spartanicus
Jul 21 '05 #17
in comp.infosystems.www.authoring.stylesheets, Bob Bedford wrote:
----------------------
| foo foo foo foo foo |
----------------------
| foo foo foo foo foo |
----------------------
bar bar bar bar bar
Aha.
The last line contain datas differents than foo (actually a grid for
changing pages < 1 2 3 4 5.....)
It sounds like it is not actually part of the table, but something
irrelated? Maybe put it outside table woudl be better
and I don't want a border around. that's why I wanted control on TR,
in order to put a border aroud (aroud foo) but not around bar


table {border-collapse:collapse;}
tr {border:solid}
tr.last {border:none}

--
Lauri Raittila <http://www.iki.fi/lr> <http://www.iki.fi/zwak/fonts>
Utrecht, NL.
Jul 21 '05 #18

"Lauri Raittila" <la***@raittila.cjb.net> a écrit dans le message de news:
MP************************@news.individual.net...
in comp.infosystems.www.authoring.stylesheets, Bob Bedford wrote:
----------------------
| foo foo foo foo foo |
----------------------
| foo foo foo foo foo |
----------------------
bar bar bar bar bar


Aha.
The last line contain datas differents than foo (actually a grid for
changing pages < 1 2 3 4 5.....)


It sounds like it is not actually part of the table, but something
irrelated? Maybe put it outside table woudl be better
and I don't want a border around. that's why I wanted control on TR,
in order to put a border aroud (aroud foo) but not around bar


table {border-collapse:collapse;}
tr {border:solid}
tr.last {border:none}


That's what I'm trying to do since the beginning, but it doesn't work
Jul 21 '05 #19
"Spartanicus" <me@privacy.net> a écrit dans le message de news:
39********************************@n...utvinternet.ie...
"Bob Bedford" <be******@notforspammershotmail.com> wrote:
> http://homepage.ntlworld.com/spartanicus/tr_border.htm

Ok, now add a third line: the new created one must have no border on
left
bottom and right.

Still clear as mud, upload a graphic that demonstrates what you want.


----------------------
| foo foo foo foo foo |
----------------------
| foo foo foo foo foo |
----------------------
bar bar bar bar bar


You could easily have done that slight modification yourself, example is
updated.


I know ! but was missing the tr border. that was my first question.

The main purpose of this is allow my clients to manage their own CSS. I mean
the page will be shown as a frame source on other websites.

I wanted to keep it as simple as possible, with 4-5 styles to manage. But if
there is no other solution, I give up.

Also, I managed it by creating a "BIG" table without border, and putting the
foo datas in a table (where I show the border) and a cell of the big table
contains bar datas.

Thanks for help !

Bob
Jul 21 '05 #20
in comp.infosystems.www.authoring.stylesheets, Bob Bedford wrote:

"Lauri Raittila" <la***@raittila.cjb.net> a écrit dans le message de news:
MP************************@news.individual.net...
in comp.infosystems.www.authoring.stylesheets, Bob Bedford wrote:
----------------------
| foo foo foo foo foo |
----------------------
| foo foo foo foo foo |
----------------------
bar bar bar bar bar
table {border-collapse:collapse;}
tr {border:solid}
tr.last {border:none}


That's what I'm trying to do since the beginning, but it doesn't work


Worked for me, on Opera 8, and afaik works on all browsers. (though some
might have problem with border shorthand without width)
Did you have border-collapse:collapse? (borders for tablerows are ignored
in separated border modell). Or do you mean something else?

Where is your URL?
--
Lauri Raittila <http://www.iki.fi/lr> <http://www.iki.fi/zwak/fonts>
Utrecht, NL.
Jul 21 '05 #21
> Worked for me, on Opera 8, and afaik works on all browsers. (though some
might have problem with border shorthand without width)
Did you have border-collapse:collapse? (borders for tablerows are ignored
in separated border modell). Or do you mean something else? Ok' I'll try again.
Where is your URL?

Offline. still in dev !

Thanks.

Bob
Jul 21 '05 #22
Bob Bedford wrote:
Worked for me, on Opera 8, and afaik works on all browsers. (though some
might have problem with border shorthand without width)
Did you have border-collapse:collapse? (borders for tablerows are ignored
in separated border modell). Or do you mean something else?


Ok' I'll try again.
Where is your URL?


Offline. still in dev !

Thanks.

Bob


there are places on the internet, you know, where they offer to host
also your webmirracles for free. i do get the impression you found your
way online somehow, now its maybe time to let go of some of your babies
and let them have a home of their own, or maybe sharing a roof with who
knows.
Jul 21 '05 #23
Bob Bedford wrote:
I've a table.

The table must not have any border.
The TR (every line) must have a border, but not the lines between cells.
The TR.pages must have no border.

so .mytable{border:0px;}

.mytable tr{border:1px solid #000000;}
.mytable th{border:0px;}
.mytable tr.pages {border:0px;}

doesn't work, can't have the border around tr. The table has no border
at all.

may this work ?

bob


Try the 'border-collapse: collapse' rule on the table.
Regards,
N.Demos
Example Page:
=============

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Final//EN"
"http://www.w3.org/TR/html4/final.dtd">
<HTML>
<HEAD>
<TITLE></TITLE>
<STYLE type="text/css">
BODY {
color: #FFFFFF;
background-color: #000000;
}
TABLE#mytable {
border-collapse: collapse;
border-width: 0px;
}
TD {
text-align: left;
padding: 1px 5px 1px 3px;
color: #000000;
background-color: #AAFF00;
border-style: solid;
border-color: #FF0000;
border-width: 3px 0px 0px 0px;
}

</STYLE>
</HEAD>

<BODY>

<TABLE id="mytable">
<TR>
<TD>Cell A1</TD>
<TD>Cell A2</TD>
<TD>Cell A3</TD>
</TR>
<TR>
<TD>Cell B1</TD>
<TD>Cell B2</TD>
<TD>Cell B3</TD>
</TR>
<TR>
<TD>Cell C1</TD>
<TD>Cell C2</TD>
<TD>Cell C3</TD>
</TR>
</TABLE>
</BODY>
</HTML>
--
Change "seven" to a digit to email me.
Jul 21 '05 #24

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: Vigil | last post by:
I am trying to put a 7px border around a page. If the contents don't fill up the viewport, then the border must appear all around the viewport. If the page is larger than the viewport, then the...
15
by: Oliver | last post by:
Hello i want to get a nice border around images, but not just with the simple <img src"....." border="1"> tag. I tried it in CSS. I did the following: <div class="img_class"> <img...
5
by: Mel | last post by:
is it possible to draw a border around a row of a table ? example please... thanks
4
by: Aris | last post by:
I wonder if there is an easy way to plase a border around a picture. I have already tryed with the trasparent function but the border gets upon the picture so it hides some of it. I have...
8
by: UJ | last post by:
I have a table with multiple cells and I want to draw a box around the entire table but not around the individual cells. How do I do that? TIA - Jeff.
3
by: mcwd | last post by:
I'm trying to put a border around a link when the mouse rolls over it. I've made an example below and left out the hover to keep it simple. In IE the example below draws a box arround the image OK,...
1
by: constantlearner | last post by:
I have the following code, which you can paste into an html file and try. In IE, a border appears around the selection box. How do I make the border around the selection box transparent, or have no...
5
by: smittie31 | last post by:
I am having a problem with a border around me html page. The border does not flow thru the whole html page, it cuts off halfway. --> See http://keithborom.com/marlon-sanders CSS STYLESHEET ...
5
by: JWest46088 | last post by:
I cannot figure out how to get rid of the border around my button image. I got rid of the blue border by setting border=0, but I am still getting a purple border around them after I click them until...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.