473,387 Members | 1,575 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,387 software developers and data experts.

TR's w no Style?

I ran across a situation where I could not format my row bottom border
color.

I was using:

<tr style="border-bottom:solid 1px #cccccc;">

and it didn't work, but

<td style="border-bottom:solid 1px #cccccc;">

did.

Why is that?

Mike

Oct 5 '05 #1
15 29053
mike wrote:
I ran across a situation where I could not format my row bottom border
color.
It generally helps if you:
1. Provide a URI to a page that demonstrates the issue
2. Mention which browser is experiencing the problem
I was using:

<tr style="border-bottom:solid 1px #cccccc;">

and it didn't work, but

<td style="border-bottom:solid 1px #cccccc;">


Such incomplete test cases are useless. However, since I have seen this
problem before, it is a bug with Firefox 1.0.x that has been fixed in
more recent builds. Do any of these test cases demonstrate the issue?

http://lachy.id.au/dev/css/tests/css...t-dsp-23-d.xht
http://lachy.id.au/dev/css/tests/css...t-dsp-26-d.xht
http://lachy.id.au/dev/css/tests/css...t-dsp-27-d.xht
http://lachy.id.au/dev/css/tests/css...t-dsp-37-d.xht
http://lachy.id.au/dev/css/tests/css...t-dsp-40-d.xht
http://lachy.id.au/dev/css/tests/css...t-dsp-42-d.xht

--
Lachlan Hunt
http://lachy.id.au/
http://GetFirefox.com/ Rediscover the Web
http://GetThunderbird.com/ Reclaim your Inbox
Oct 6 '05 #2
Sorry, its IE and the test case is simply:

<table>
<tr style="border-bottom:solid 1px #cccccc;">
<tr>stuff1</tr><tr>stuff2</tr><tr>stuff3</tr><tr>stuff4</tr>
</tr>
<tr style="border-bottom:solid 1px #cccccc;">
<tr>stuff1</tr><tr>stuff2</tr><tr>stuff3</tr><tr>stuff4</tr>
</tr>
<table>

should be a bottom border.

Oct 6 '05 #3
In our last episode, mike <hi****@charter.net> pronounced to
comp.infosystems.www.authoring.html:

<snip code>
should be a bottom border.


No, it shouldn't be anything. Try running your page through the
validator. You can't nest table rows.

--
Mark Parnell
http://clarkecomputers.com.au
Oct 6 '05 #4
in comp.infosystems.www.authoring.html, mike wrote:
I ran across a situation where I could not format my row bottom border
color.

I was using:

<tr style="border-bottom:solid 1px #cccccc;">

and it didn't work, but

<td style="border-bottom:solid 1px #cccccc;">

did.

Why is that?


Missing border-collapse:collapse; on table?

--
Lauri Raittila <http://www.iki.fi/lr> <http://www.iki.fi/zwak/fonts>
Oct 6 '05 #5
Sorry about that .... typos there. Those were <td> tags ..

<table>
<tr style="border-bottom:solid 1px #cccccc;">
<td>stuff1</td><td>stuff2</td><td>stuff3</td><td>stuff4</td>
</tr>
<tr style="border-bottom:solid 1px #cccccc;">
<td>stuff1</td><td>stuff2</td><td>stuff3</td><td>stuff4</td>
</tr>
<table>

Oct 6 '05 #6
What I really want is the rows to be underlined.

<table cellspacing="0">
<tr>
<td style="border-bottom:solid 1px #cccccc;">stuff1</td>
<td style="border-bottom:solid 1px #cccccc;">stuff2</td>
<td style="border-bottom:solid 1px #cccccc;">stuff3</td>
<td style="border-bottom:solid 1px #cccccc;">stuff4</td>
</tr>
<tr>
<td style="border-bottom:solid 1px #cccccc;">stuff1</td>
<td style="border-bottom:solid 1px #cccccc;">stuff2</td>
<td style="border-bottom:solid 1px #cccccc;">stuff3</td>
<td style="border-bottom:solid 1px #cccccc;">stuff4</td>
</tr>
<table>

This is the workaround. I would think I could format the <tr> row tags
to achieve this.

Comments?

Mike

Oct 6 '05 #7
Els
mike wrote:
What I really want is the rows to be underlined.

<table cellspacing="0">
<tr>
<td style="border-bottom:solid 1px #cccccc;">stuff1</td>
<td style="border-bottom:solid 1px #cccccc;">stuff2</td>
<td style="border-bottom:solid 1px #cccccc;">stuff3</td>
<td style="border-bottom:solid 1px #cccccc;">stuff4</td>
</tr>
<tr>
<td style="border-bottom:solid 1px #cccccc;">stuff1</td>
<td style="border-bottom:solid 1px #cccccc;">stuff2</td>
<td style="border-bottom:solid 1px #cccccc;">stuff3</td>
<td style="border-bottom:solid 1px #cccccc;">stuff4</td>
</tr>
<table>

This is the workaround. I would think I could format the <tr> row tags
to achieve this.

Comments?


Yes.
Take the cellspacing off the table and the styles off the td elements,
give the table a class (unless you want that border on all tables),
and set the style in the stylesheet/styleblock:

table.someclass{
border-collapse:collapse;
}
table.someclass td{
border-bottom:solid 1px #cccccc;
}

--
Els http://locusmeus.com/
Sonhos vem. Sonhos vão. O resto é imperfeito.
- Renato Russo -
Oct 6 '05 #8
So, you are saying that the mark-up is on the TD tag and is NOT
AVAILABLE on the TR tag, correct?

Oct 6 '05 #9
mike wrote:
So, you are saying
Well, I'm not sure what was said, since you didn't quote what you are
replying too! Please learn to quote properly.
that the mark-up is on the TD tag and is NOT AVAILABLE on the TR tag, correct?


No, you can style tr elements in the same way you can style td elements.
Just change the selector to select tr instead of td, like this:

table.someclass{
border-collapse:collapse;
}
table.someclass tr{
border-bottom:solid 1px #cccccc;
}

--
Lachlan Hunt
http://lachy.id.au/
http://GetFirefox.com/ Rediscover the Web
http://GetThunderbird.com/ Reclaim your Inbox
Oct 6 '05 #10
In our last episode, mike <hi****@charter.net> pronounced to
comp.infosystems.www.authoring.html:
Sorry about that .... typos there.


That's one of many reasons a URL is much more useful than snippets of
code.

--
Mark Parnell
http://clarkecomputers.com.au
Oct 7 '05 #11
table.someclass tr{
border-bottom:solid 1px #cccccc;
}

This is not going to work. It the same thing as if I manually put:

<tr style= "border-bottom:solid 1px #cccccc;">

Which i did in the first post. In that post I asked why this does not
work. I am using IE.

Oct 7 '05 #12
Els
mike wrote:
table.someclass tr{
border-bottom:solid 1px #cccccc;
}

This is not going to work. It the same thing as if I manually put:

<tr style= "border-bottom:solid 1px #cccccc;">

Which i did in the first post. In that post I asked why this does not
work. I am using IE.


It doesn't work on TR in IE.
Specs dictate it should, but IE isn't following the specs in this.
Setting it on the TD instead is the workaround for it.

--
Els http://locusmeus.com/
Sonhos vem. Sonhos vão. O resto é imperfeito.
- Renato Russo -
Oct 7 '05 #13
"mike" <hi****@charter.net> wrote:
table.someclass tr { border-bottom: solid 1px #cccccc; }
This is not going to work. It the same thing as if I manually put:
<tr style= "border-bottom:solid 1px #cccccc;">

Which i did in the first post. In that post I asked why this does not
work. I am using IE.


The very first response you got was the correct one: you haven't
specified the table's border model. Since you want inline style, here's
how:

<table cellspacing=0 style="border-collapse:collapse;">
<tr>
<td style="border-bottom:solid 1px #cccccc;">stuff1</td>
<td style="border-bottom:solid 1px #cccccc;">stuff2</td>
<td style="border-bottom:solid 1px #cccccc;">stuff3</td>
<td style="border-bottom:solid 1px #cccccc;">stuff4</td>
</tr>
<tr>
<td style="border-bottom:solid 1px #cccccc;">stuff1</td>
<td style="border-bottom:solid 1px #cccccc;">stuff2</td>
<td style="border-bottom:solid 1px #cccccc;">stuff3</td>
<td style="border-bottom:solid 1px #cccccc;">stuff4</td>
</tr>
<table>
Oct 7 '05 #14
Els
Keith Baird wrote:
"mike" <hi****@charter.net> wrote:
table.someclass tr { border-bottom: solid 1px #cccccc; }
This is not going to work. It the same thing as if I manually put:
<tr style= "border-bottom:solid 1px #cccccc;">

Which i did in the first post. In that post I asked why this does not
work. I am using IE.


The very first response you got was the correct one: you haven't
specified the table's border model. Since you want inline style, here's
how:

<table cellspacing=0 style="border-collapse:collapse;">
<tr>
<td style="border-bottom:solid 1px #cccccc;">stuff1</td>
<td style="border-bottom:solid 1px #cccccc;">stuff2</td>
<td style="border-bottom:solid 1px #cccccc;">stuff3</td>
<td style="border-bottom:solid 1px #cccccc;">stuff4</td>
</tr>
<tr>
<td style="border-bottom:solid 1px #cccccc;">stuff1</td>
<td style="border-bottom:solid 1px #cccccc;">stuff2</td>
<td style="border-bottom:solid 1px #cccccc;">stuff3</td>
<td style="border-bottom:solid 1px #cccccc;">stuff4</td>
</tr>
<table>


That's what Mike meant from the beginning: it's a work-around for
having a bottom underlining on the TR.

--
Els http://locusmeus.com/
Sonhos vem. Sonhos vão. O resto é imperfeito.
- Renato Russo -
Oct 7 '05 #15
That's right Els .... I was saying that the border-bottom did not work
in TR's.

Oct 17 '05 #16

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

Similar topics

4
by: John MacIntyre | last post by:
Hi, Using the script below, when you click on the radio button beside click here .... the first row shrinks. Has anybody else ever experienced this? Does anybody know of a logical...
23
by: Bob Bedford | last post by:
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;} ...
5
by: Gregor Rot | last post by:
Hi, if i have this code: <form><input type=text name="id1"></form> then with javascript i can reference this with this.form.id1, how can i reference something like this: <table> <tr...
10
by: soup_or_power | last post by:
Hi I've downloaded the script at http://www.walterzorn.com/dragdrop/dragdrop_e.htm#config for drag and drop feature. I tried enclosing <div></div> tags around <table> so that the entire table...
12
by: Jerad Rose | last post by:
I searched for a while trying to find the answer to this, but to no avail. I am trying to find the best way (or any way) to dynamically show and hide groups of TR's. For example, I have a...
1
by: HoustonFreeways | last post by:
Here I use the style attributes for a Gridview, such as AlternatingRowStyle-BorderColor <asp:GridView runat=server ID=gv_tabular_data AllowPaging=false AllowSorting=false BorderColor=#F17901...
117
by: phil-news-nospam | last post by:
Is there really any advantage to using DIV elements with float style properies, vs. the old method of TABLE and TR and TD? I'm finding that by using DIV, it still involves the same number of...
7
by: deste | last post by:
Hi folks! I've got a problem with javascript and DOM. I want to create a simple "intelligent" <table>, inside a data-form. I'd like to do: - Change color of any <tron onMouseOver DOM event; -...
1
by: cyrix | last post by:
I'm having quite a problem with the height in one of my rows in a table. Please see http://www.djcyrix.be/acu/ in both Firefox and IE and you'll see what I mean. Firefox displays the table correctly,...
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.