Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > CSS background competing selectors question

Reply
Thread Tools

CSS background competing selectors question

 
 
Derek Clarkson
Guest
Posts: n/a
 
      11-06-2003
Hi all,
I have the following css file:

tr td:first-child {text-align:left;}
..BTCategory {background-color:#99ff99;}

In my html file I have

<table>
<tr>
<td class="BTCategory"> ....</td>
....

I would have thought that this would have worked creating a table with the
first cell having the specified colour and being left justified. But
instead the background colour is not applied. Can anyone explain why this
is not working ?

I thought it would because whilst both style declarations are applicable to
the cell, they do not clash over the attributes they are setting.

cio
Derek.



--
cio
Derek
 
Reply With Quote
 
 
 
 
rf
Guest
Posts: n/a
 
      11-06-2003

"Derek Clarkson" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi all,
> I have the following css file:
>
> tr td:first-child {text-align:left;}
> .BTCategory {background-color:#99ff99;}
>
> In my html file I have
>
> <table>
> <tr>
> <td class="BTCategory"> ....</td>
> ...
>
> I would have thought that this would have worked creating a table with the
> first cell having the specified colour and being left justified. But
> instead the background colour is not applied. Can anyone explain why this
> is not working ?


Not supported by IE AFAIK.

Cheers
Richard.


 
Reply With Quote
 
 
 
 
Steve Pugh
Guest
Posts: n/a
 
      11-06-2003
"rf" <(E-Mail Removed)> wrote:
>"Derek Clarkson" <(E-Mail Removed)> wrote:
>>
>> tr td:first-child {text-align:left;}
>> .BTCategory {background-color:#99ff99;}
>>
>> <table>
>> <tr>
>> <td class="BTCategory"> ....</td>
>>
>> I would have thought that this would have worked creating a table with the
>> first cell having the specified colour and being left justified. But
>> instead the background colour is not applied. Can anyone explain why this
>> is not working ?

>
>Not supported by IE AFAIK.


Um, first-child isn't supported by IE but the OP was reporting that
the background-color, set by a standard class selector, wasn't
working.

I can't replicate that error with the code given so I suspect that
it's a clash with some other style and that the OP will need to
provide a URL before we can investigate further.

Steve

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <(E-Mail Removed)> <http://steve.pugh.net/>
 
Reply With Quote
 
Derek Clarkson
Guest
Posts: n/a
 
      11-07-2003
Found it. It wasn't a style issue after all. I was using JBuilder to
develope a struts site. It appears that if you change a css file in a
Jbuilder project and recompile the project, the changed css file is not
copied to the web server directories. I had to do a complete re-compile to
get the css file refreshed correctly.

Thanks to everyone who replied. I don't know if the site will work in IE as
I'm on linux and don't have it. Frankly I choose to exercise some
prejustice here and say "I don't support IE" in reply to all those sites
who say "We don't support anything but IE". Although technical we are both
wrong as the idea of the web is that you should not have to worry about
what browser you are using such in life.



--
cio
Derek
 
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
Help With CSS Selectors Nathan Sokalski ASP .Net 5 03-24-2008 11:11 AM
css selectors Jon Slaughter HTML 13 04-21-2007 05:08 PM
Question about CSS selectors Jeanne D HTML 8 10-16-2005 01:12 PM
css - descendant selectors Nik Coughin HTML 2 01-29-2004 12:12 AM
Class and ID Selectors (CSS question) Matt Beckwith HTML 3 07-13-2003 08:39 PM



Advertisments