isaac_cm Posted September 19, 2007 Share Posted September 19, 2007 Hello, Is it possible to change the combo box look for example adding skins using CSS ? Thanks Quote Link to comment Share on other sites More sharing options...
mainewoods Posted September 20, 2007 Share Posted September 20, 2007 <select style="background-color:#ccc;color:red;font-size:1.2em"> <option>1</option> <option>2</option> </select> Quote Link to comment Share on other sites More sharing options...
isaac_cm Posted September 20, 2007 Author Share Posted September 20, 2007 no I meant to completely change the way it look not just color of background , for example making the box raised and changing drop down arrow look Quote Link to comment Share on other sites More sharing options...
dbrimlow Posted September 20, 2007 Share Posted September 20, 2007 Yes. So long as you follow the proper rules of form creation, syntax and use proper doctype with valid code and css, form styling can be controlled (there are some cross-browser issues). It is not simple or basic css, though, it is actually quite advanced, but easy to learn. Here is a great article and tutorial for styling all types of form elements - including combo boxes - along with cross-browser fixes. Don't expect to "get it" all in one quick shot, though. Read it through carefully and even copy the sample page code and css for personal styling experimentation: http://www.456bereastreet.com/archive/200410/styling_even_more_form_controls/ Quote Link to comment Share on other sites More sharing options...
isaac_cm Posted September 21, 2007 Author Share Posted September 21, 2007 those styles depend on current win xp themes I need a dependant style not related to OS Quote Link to comment Share on other sites More sharing options...
mainewoods Posted September 21, 2007 Share Posted September 21, 2007 Using Form controls + css is way more cross browser disfunctional than normal html. A while back I had done some experiments and research and found that the usage of css items like 'padding' or 'border' with form control are near impossible to make cross browser compatable. The select box itself turned out to be the most cross browser chalanged with the application of css. Way funky things can happen with the select downarrrow itself with the application of what you might think was simple, basic css. I gave up trying to make the form controls much fancier with the use of css because of the hideous cross browser compatability problems and settled with just setting a slightly off white background color for the controls. Quote Link to comment Share on other sites More sharing options...
bronzemonkey Posted September 21, 2007 Share Posted September 21, 2007 mainewoods is correct - you can't reliably style form controls with css. Quote Link to comment Share on other sites More sharing options...
isaac_cm Posted September 21, 2007 Author Share Posted September 21, 2007 this why I going to use flex in the future, the web is changing and using old same controls now like using a radio from the 60s Quote Link to comment Share on other sites More sharing options...
dbrimlow Posted September 24, 2007 Share Posted September 24, 2007 Try this technique (it may be what you seek). http://www.alistapart.com/articles/prettyaccessibleforms I have never had any trouble adding simple (and reasonable) css styling to forms. I don't try to change the actual browser skin widgets, though. Quote Link to comment Share on other sites More sharing options...
isaac_cm Posted September 24, 2007 Author Share Posted September 24, 2007 thanks my friend , look at this cool forms http://extjs.com/deploy/ext/examples/form/dynamic.html Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.