Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > css - descendant selectors

Reply
Thread Tools

css - descendant selectors

 
 
Nik Coughin
Guest
Posts: n/a
 
      01-28-2004
Alliss wrote:
> I am using IE 6.0
> I set up what I thought was a descendant selector but it will not
> work. I think perhaps I have misunderstood the concept and hope
> someone might enlighten me.
> I am trying to change the background color of a particular select
> element which is contained within a division classed as 'base' .
> Outside this div I have other select elements that I do not want
> changed.
>
> My css contains :
> base select { background-color: #5b6e84; color:#FFFFFF; }
>
> My html contains :
> <DIV class="base">
> <form id="form1" method="post" action="<?php echo $PHP_SELF ?> ">
> <DIV id="contacts">
> <select name="contactID" id="contactID" size="28" >
> <option >....
>
> Thanks
> Alliss


Should have a fullstop before base to indicate that it is a class:

..base select { background-color: #5b6e84; color:#FFFFFF; }


 
Reply With Quote
 
 
 
 
Alliss
Guest
Posts: n/a
 
      01-28-2004

I am using IE 6.0
I set up what I thought was a descendant selector but it will not work. I
think perhaps I have misunderstood the concept and hope someone might
enlighten me.
I am trying to change the background color of a particular select element
which is contained within a division classed as 'base' .
Outside this div I have other select elements that I do not want changed.

My css contains :
base select { background-color: #5b6e84; color:#FFFFFF; }

My html contains :
<DIV class="base">
<form id="form1" method="post" action="<?php echo $PHP_SELF ?> ">
<DIV id="contacts">
<select name="contactID" id="contactID" size="28" >
<option >....

Thanks
Alliss


 
Reply With Quote
 
 
 
 
Alliss
Guest
Posts: n/a
 
      01-29-2004

> Should have a fullstop before base to indicate that it is a class:


Thanks Nik


 
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
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
Changing CSS 2.1 descendant selectors Andrew Poulos Javascript 5 02-02-2005 01:53 PM
CSS background competing selectors question Derek Clarkson HTML 3 11-07-2003 12:08 AM
Class and ID Selectors (CSS question) Matt Beckwith HTML 3 07-13-2003 08:39 PM



Advertisments