HighDots Forums  

border-top in IE and FireFox

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss border-top in IE and FireFox in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Ken Loomis
 
Posts: n/a

Default border-top in IE and FireFox - 04-26-2006 , 09:44 AM






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.

-------------------------------------------------------
Quote:
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


Reply With Quote
  #2  
Old   
Ken Loomis
 
Posts: n/a

Default Re: border-top in IE and FireFox - 04-26-2006 , 02:41 PM






On Wed, 26 Apr 2006 13:26:15 -0500, kchayka <usenet (AT) c-net (DOT) us> wrote:

Quote:
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.

Quote:
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


Reply With Quote
  #3  
Old   
Beauregard T. Shagnasty
 
Posts: n/a

Default Re: border-top in IE and FireFox - 04-26-2006 , 03:41 PM



Ken Loomis wrote:

Quote:
On Wed, 26 Apr 2006 13:26:15 -0500, kchayka <usenet (AT) c-net (DOT) 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


Reply With Quote
  #4  
Old   
Ken Loomis
 
Posts: n/a

Default Re: border-top in IE and FireFox - 04-26-2006 , 06:38 PM



On Wed, 26 Apr 2006 18:29:06 -0500, kchayka <usenet (AT) c-net (DOT) us> wrote:

Quote:
Ken Loomis wrote:
On Wed, 26 Apr 2006 13:26:15 -0500, kchayka <usenet (AT) c-net (DOT) 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




Reply With Quote
Reply




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.