473,398 Members | 2,389 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,398 software developers and data experts.

border-top in IE and FireFox

Hello:

I would like a table with alternating color rows, a border between
rows, and a border around the entire table. I want no borders between
cells.

-------------------------------------------------------
| header-a header-b header-c header-d |
|---------------------------------------------------- |
|data1a data1b data1c data1d |
|-----------------------------------------------------|
|data2a data2b data2c data2d |
|______________________________________|

I use the following CSS

table.users {
border-collapse: collapse;
margin-left:auto;
margin-right:auto;
text-align:left;
width:750px;
border: 3px groove #369;
background-color: #CCC;
}

table.users td {
padding:0 1px;
}

tr.blue {
background-color: #CCF;
border-top:1px solid #333;
}

tr.gray {
background-color: #CCC;
border-top:1px solid #333;
}

This renders as I would like in FireFox but in IE there are no row
borders.

What am I doing wrong?

Thanks,

Ken
Apr 26 '06 #1
5 6354
Ken Loomis wrote:

tr.blue {
border-top:1px solid #333;
}

This renders as I would like in FireFox but in IE there are no row
borders.


Put the border on the td instead:
tr.blue td {
border-top:1px solid #333;
}

If borders are collapsed, it should end up a solid line.

BTW, you would be better off using a more generic name for your class
selectors, maybe identifying alternate-row or even/odd-row rather than a
specific color. What happens when you decide to change the color scheme?
Your class names won't make sense any more.

--
Reply email address is a bottomless spam bucket.
Please reply to the group so everyone can share.
Apr 26 '06 #2
On Wed, 26 Apr 2006 13:26:15 -0500, kchayka <us****@c-net.us> wrote:
Ken Loomis wrote:

tr.blue {
border-top:1px solid #333;
}

This renders as I would like in FireFox but in IE there are no row
borders.
Put the border on the td instead:
tr.blue td {
border-top:1px solid #333;
}

If borders are collapsed, it should end up a solid line.


kchayka, thanks so much. MS thinks its border-top works, but it looks
to me like it doesn't.
BTW, you would be better off using a more generic name for your class
selectors, maybe identifying alternate-row or even/odd-row rather than a
specific color. What happens when you decide to change the color scheme?
Your class names won't make sense any more.


I hear you, but then again, when you're coding up the html, it's nice
to be able to specify the color. If I wanted to change the color I
think I would create another style with a different name. I'm a
programmer first, so I guess I look at it bassackwords

Thanks again. I really appreciate it.

Ken
Apr 26 '06 #3
Ken Loomis wrote:
On Wed, 26 Apr 2006 13:26:15 -0500, kchayka <us****@c-net.us> wrote:
BTW, you would be better off using a more generic name for your class
selectors, maybe identifying alternate-row or even/odd-row rather
than a specific color. What happens when you decide to change the
color scheme? Your class names won't make sense any more.


I hear you, but then again, when you're coding up the html, it's nice
to be able to specify the color. If I wanted to change the color I
think I would create another style with a different name. I'm a
programmer first, so I guess I look at it bassackwords


In my style sheets, I have some standard color coding where I use class
names such as "hot" (a deep red) and "veryhot" (a bright red), and
"cool" (a medium blue). If my clients should decide they like a green
color to indicate the styled words, all I have to do is change the color
number one place, and the HTML still says: class="hot" (which that
client deems .. hot. <g>

I don't end up with class="red" and it displays green.

--
-bts
-Warning: I brake for lawn deer
Apr 26 '06 #4
Ken Loomis wrote:
On Wed, 26 Apr 2006 13:26:15 -0500, kchayka <us****@c-net.us> wrote:
Put the border on the td instead:
tr.blue td {
border-top:1px solid #333;
}

If borders are collapsed, it should end up a solid line.


kchayka, thanks so much. MS thinks its border-top works, but it looks
to me like it doesn't.


WFM. Post a URL.

--
Reply email address is a bottomless spam bucket.
Please reply to the group so everyone can share.
Apr 26 '06 #5
On Wed, 26 Apr 2006 18:29:06 -0500, kchayka <us****@c-net.us> wrote:
Ken Loomis wrote:
On Wed, 26 Apr 2006 13:26:15 -0500, kchayka <us****@c-net.us> wrote:
Put the border on the td instead:
tr.blue td {
border-top:1px solid #333;
}

If borders are collapsed, it should end up a solid line.


kchayka, thanks so much. MS thinks its border-top works, but it looks
to me like it doesn't.


WFM. Post a URL.


You may have misunderstood me. Your solution of putting the
border-top in the <td> works perfectly. According to MS docs, putting
it in the <tr> should work, but it doesn't for me.

Thanks again,

Ken
Apr 26 '06 #6

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

Similar topics

9
by: Harry | last post by:
Whats wrong with this? top.document.frmMain.tabMain.border = "1"; thanks
33
by: Thomas Mlynarczyk | last post by:
Hi, I'm looking for a way to put a 1px solid border around the image in this link: <a href="some.html"><img src="some.gif"></a> Well, that, by itself, is simple. However, I would like to have a...
5
by: Rolf Brauser | last post by:
Hi, I want to have a table with a border of 1px arround it but table="1" is more than a pixel because this 3d effect is attached. Values below are not accepted How can I get this border with...
0
by: yurps | last post by:
Hello here is my html, if you click the missing image in the first column on the left, the div is shown, when clicked again the div disappears...but the bottom border disappears as well...Is there...
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;} ...
19
by: Eva | last post by:
Hi, I'm really really really new to javascripts and so i couldn't really comprehend thoroughly on the the previous posts regarding this issue. Anyways, I'm setting up a picture album site....
3
by: effendi | last post by:
Hi Can any tell me what is the javascript equivalent of CSS border? I would like to change the border of my cell when it is set on focus. I have tried onFocus="style.border='3px'" but it is not...
16
by: Barbara de Zoete | last post by:
Here's what I'm trying to do: Create a table with generic style property . Have a few table cells in the thead that 'have to' melt into eachother, so needing the style . Looking somthing...
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.
2
ramprabu
by: ramprabu | last post by:
Hello, I will give the sample code of html. Here first table only apply border 1 width. other tables are border 0. The problem is border=0 means border was not visible but it takes white border...
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...
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
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

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.