css - descendant selectors

Discussion in 'HTML' started by Nik Coughin, Jan 28, 2004.

  1. Nik Coughin

    Nik Coughin Guest

    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; }
    Nik Coughin, Jan 28, 2004
    #1
    1. Advertising

  2. Nik Coughin

    Alliss Guest

    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
    Alliss, Jan 28, 2004
    #2
    1. Advertising

  3. Nik Coughin

    Alliss Guest


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


    Thanks Nik
    Alliss, Jan 29, 2004
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Matt Beckwith

    Class and ID Selectors (CSS question)

    Matt Beckwith, Jul 12, 2003, in forum: HTML
    Replies:
    3
    Views:
    380
    David Dorward
    Jul 13, 2003
  2. Derek Clarkson
    Replies:
    3
    Views:
    378
    Derek Clarkson
    Nov 7, 2003
  3. Jeanne D

    Question about CSS selectors

    Jeanne D, Oct 15, 2005, in forum: HTML
    Replies:
    8
    Views:
    378
    Jeanne D
    Oct 16, 2005
  4. Jon Slaughter

    css selectors

    Jon Slaughter, Apr 17, 2007, in forum: HTML
    Replies:
    13
    Views:
    944
    Ben C
    Apr 21, 2007
  5. Andrew Poulos

    Changing CSS 2.1 descendant selectors

    Andrew Poulos, Feb 2, 2005, in forum: Javascript
    Replies:
    5
    Views:
    151
    Martin Honnen
    Feb 2, 2005
Loading...

Share This Page