SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    jigga jigga what? slider's Avatar
    Join Date
    Oct 2002
    Location
    Utah (USA)
    Posts
    309
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    CSS for < select > ???

    I'm able to change the way a text input box looks by doing this:
    Code:
    .mainForm {
    	font-family: Geneva, Arial, Helvetica, sans-serif;
    	font-size: 11px;
    	margin: 0;
    	padding: 1px;
    	border: solid #D8D8D8 1px;
    }
    input.mainForm {
    	padding-left: 3px;
    }
    But when I do
    Code:
    <select class="mainForm">
    	...
    </select>
    It doesn't change the look of the select. Can I do this?
    $slider = 'n00b';

  2. #2
    SitePoint Enthusiast
    Join Date
    Nov 2002
    Posts
    28
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Maybe try putting a <span> around the <select> and style the span? I'm not sure if a select is a block or inline element, though. Also try applying the styles to your <option> elements instead.

  3. #3
    ********* Wizard silver trophy Cam's Avatar
    Join Date
    Aug 2002
    Location
    Burpengary, Australia
    Posts
    4,495
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    Have a look here - http://msdn.microsoft.com/workshop/a...cts/select.asp

    Unfortunately, the <SELECT> menu is open to very little customisation via CSS. I just had a quick play with another method I use to style file inputs better but it didn't work. Still, have a look at that site to see if it helps you at all


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
  •