Printable Version of Topic

Click here to view this topic in its original format

HTMLHelp Forums _ Markup (HTML, XHTML, XML) _ Select Tag

Posted by: cweb Mar 15 2011, 11:24 AM

Hello.
How do you CSS style select elements? This is all new to me so I apologize if I am not using the correct terminology.

Display select elements using absolute positioning w/the top coordinate set to 0pixels & the left coordinate set to 250 pixels. set the font size to 12 pixels.
This is what I have:

CODE
select
          {
        position:absolute;
            top:0px;
                left:250px;
                font-size:12px;
          }


Posted by: pandy Mar 15 2011, 11:28 AM

So what's wrong with it?

Posted by: cweb Mar 15 2011, 11:45 AM

QUOTE(pandy @ Mar 15 2011, 12:28 PM) *

So what's wrong with it?


I just wanted to know if that was the correct way to set up the select[i] element.
Thanks you

Posted by: pandy Mar 15 2011, 12:29 PM

You can use the CSS checker to see if your syntax is right and your browsers will show you if it works. wink.gif
http://jigsaw.w3.org/css-validator/validator.html


Posted by: Frederiek Mar 15 2011, 01:07 PM

FWIW, in my Safari/Mac, the font-size is still 11px, which apparently is the default size for <select> items. If you set the font-size to an option selector, then it becomes 12px.

Posted by: Darin McGrew Mar 15 2011, 03:22 PM

And FWIW, 12px is smaller than the minimum font size enforced by my browsers, so I'll see the minimum font size instead.

Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)