SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Zealot c-pr0mpt's Avatar
    Join Date
    Jun 2001
    Location
    Michigan
    Posts
    171
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Help with CSS dropdown colors

    Hi, I added a dropdown link box. Using CSS I am trying to customize it same as a form text box and such.

    The code for the dropdown is
    Code:
    <select size="1" name="LINKS">
    <option selected>-] Choose Destination [-</option>
    <option>- About Us</option>
    <option>- News</option>
    <option>- Hosting Options</option>
    <option>- Support Forum</option>
    <option>- Support HelpDesk</option>
    <option>- Email Support</option>
    <option>- FAQ</option>
    <option>- Contact Us</option>
    </select>
    So for the CSS in the top I put


    Code:
    <style>
    LINKS {
    background-color: #2E3643;
    border-color: black;
    border-width: 1;
    color: #727A87;
    font-family: verdana;
    font-weight: bold;
    }
    </style>
    Its not working....what am I doing wrong?
    ravio.com
    Email: corey@ravio.com

  2. #2
    SitePoint Zealot
    Join Date
    Apr 2001
    Location
    Toronto, Ontario, Canada, Earth
    Posts
    138
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hello,

    there's a couple things that you've got to change to get that to work. first, you have to put a period before the name of css class, like this:
    Code:
    <style>
    .LINKS {
    background-color: #2E3643;
    border-color: black;
    border-width: 1;
    color: #727A87;
    font-family: verdana;
    font-weight: bold;
    }
    </style>
    second, change the 'name' attribute in the <select> tag to 'class', like this:
    Code:
    <select size="1" class="LINKS">
    hope this helps,

    Jason Weinstein
    http://www.MaximumEdge.com/

  3. #3
    SitePoint Wizard Aes's Avatar
    Join Date
    Jun 2001
    Location
    Oklahoma
    Posts
    3,392
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Help with CSS dropdown colors

    Try this:
    Code:
    <select size="1" class="links">
    <option selected>-] Choose Destination [-</option>
    <option>- About Us</option>
    <option>- News</option>
    <option>- Hosting Options</option>
    <option>- Support Forum</option>
    <option>- Support HelpDesk</option>
    <option>- Email Support</option>
    <option>- FAQ</option>
    <option>- Contact Us</option>
    </select>
    And for the CSS styles use this:
    Code:
    <style>
    .links {
    background-color: #2E3643;
    border-color: black;
    border-width: 1;
    color: #727A87;
    font-family: verdana;
    font-weight: bold;
    }
    </style>
    See you around the forums!
    Colin Anderson
    Ambition is a poor excuse for those without
    sense enough to be lazy.

  4. #4
    SitePoint Zealot c-pr0mpt's Avatar
    Join Date
    Jun 2001
    Location
    Michigan
    Posts
    171
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you very much for the help. I knew it was something I was overlooking.

    ravio.com
    Email: corey@ravio.com


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
  •