SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Addict
    Join Date
    Mar 2001
    Posts
    249
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    possible to change background of select?

    Is this doable? (this will be generated dynamically so it can't be in the stylesheet)...

    I have one <TD>...with several SELECT dropdowns embedded into the one cell...I would like to change the background behind the SELECT only...but I don't know if it's possible to have 3 different backgrounds in one cell...and second if there is a way to embed a bgcolor within a <SELECT> statement. Sorry but I find CSS so confusing...

    Thanks!

  2. #2
    Posts rarely lloydi's Avatar
    Join Date
    Jan 2002
    Location
    Swindon UK
    Posts
    620
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes it is possible.

    I've used CSS to colour the SELECT options. For example, a group of items in a selection might be:

    <select>
    <option style="background:#efefef;">item</option>
    <option style="background:#efefef;">item</option>
    <option style="background:#efefef;">item</option>

    <option style="background:#0000cc;">item</option>
    <option style="background:#0000cc;">item</option>
    <option style="background:#0000cc;">item</option>

    </select>

    and so on.

    You could also alternate colours int eh select programatically. It's up to you how you want to do this.
    Build Your Own Web Site the Right Way!
    A beginners' HTML/CSS book with web standards at its heart
    The Ultimate HTML Reference
    A complete reference, in glorious hardback

  3. #3
    SitePoint Addict
    Join Date
    Mar 2001
    Posts
    249
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanx!

  4. #4
    Gone!
    Join Date
    Aug 2001
    Location
    Witty Location Parody
    Posts
    3,889
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    http://insights.iwarp.com/advanced/c...oredforms.html is an excellent overview of formatting form elements using CSS. Check it out, worth a bookmark!


  5. #5
    SitePoint Addict
    Join Date
    Mar 2001
    Posts
    249
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    excellent!


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •