#1
  1. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2003
    Location
    San Angelo, Texas (USA)
    Posts
    286
    Rep Power
    13

    Question Select forms and CSS


    Here's an easy one (I hope): I have never had a problem with CSS I couldn't figure out, except this one:

    I am developing a web application that will be used for documenting server configuration information in a database. As part of the visual design, I have CSS styles applied to all of the form elements. However, the SELECT form elements seem to ignore the CSS border styles. Take a look at the screenshots and you'll see what I mean.

    The text input form elements abide by the border styles, but the select form elements do not, including the select multiple form elements.

    The CSS I have defined is this:
    Code:
    input.text, textarea, select {
    	border: 1px solid #666666;
    	font: 12px Verdana;
    	padding: 2px;
    }
    I have another screenshot of select multiple form elements if anyone wants it. Thanx in advance for your help!
    Attached Images
  2. #2
  3. Thanks Johnny Hart (BC) R.I.P.

    Join Date
    May 2003
    Location
    Dallas
    Posts
    5,268
    Rep Power
    1955
    I can't thinnk of the reference right now, but IIRC, the select boxes are drawn by the browser, using the OS widgets. Both MSIE and the Gecko engine work this way. The Opera browser (I believe) draws its own widgets, so may respond to styles. Try your page in Opera7.

    cheers,

    gary
    There are those who manage to build a web site without knowing what they're doing; thereby proving to themselves they do, indeed, know what they're doing.

    My html and css workshop, demos and tutorials.
    Ask a better question, get a better answer.
  4. #3
  5. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2003
    Location
    San Angelo, Texas (USA)
    Posts
    286
    Rep Power
    13
    Yeah - I knew forms were drawn from system widgets, but they do behave CSS styles (except my select form elements).

    I tried a quick Google search, but I know I can get a quicker/better answer in this forum...

    Okay - just as I thought: I will mess with it some more before I give up.

    Thanx all!
  6. #4
  7. Senior Polecat
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2003
    Location
    Jersey (the original version)
    Posts
    210
    Rep Power
    11
    Yeah - I knew forms were drawn from system widgets, but they do behave CSS styles (except my select form elements).
    The select fields are drawn from straight from "Windows Elements". You'll not get them to take styling to the border (not in IE at least). You can style BG color and font but I think thats about it.
    Quidquid latine dictum sit, altum viditur.

    http://www.XSet.co.uk
  8. #5
  9. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2003
    Location
    San Angelo, Texas (USA)
    Posts
    286
    Rep Power
    13

    Cool


    Okay - good enough for me; makes perfect sense.

    Thank you all for your help!

IMN logo majestic logo threadwatch logo seochat tools logo