DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    Preeti Guest

    select list and CSS


    Hi friends

    I want to add background color in drop down list and even I wanna change
    the font color which comes in the drop down .. I tried to use <font> tag
    but it does not work inside the DROP DOWN LIST .. so please tell me how to
    do it ... Any help would be great ...
    waiting for a reply
    Preeti

  2. #2
    Russell Jones Guest

    Re: select list and CSS

    You should use CSS to format the control. Here's an example, tested in IE 5.

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <html>
    <head>
    <title></title>
    </head>
    <body>
    <SELECT id="Select1" size="1" name="Select1" style="background: blue;
    color: red; width:150px">
    <OPTION selected>
    Item 1</OPTION>
    <OPTION>
    Item 2</OPTION>
    <OPTION style="color:black">
    Item 3</OPTION>
    </SELECT>
    </body>
    </html>

    Russell Jones
    Sr. Web Development Editor
    DevX.com

    "Preeti" <preetisikri@hotmail.com> wrote in message
    news:3b82878d$1@news.devx.com...
    >
    > Hi friends
    >
    > I want to add background color in drop down list and even I wanna change
    > the font color which comes in the drop down .. I tried to use <font> tag
    > but it does not work inside the DROP DOWN LIST .. so please tell me how to
    > do it ... Any help would be great ...
    > waiting for a reply
    > Preeti




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
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links