tinker Posted February 7, 2008 Share Posted February 7, 2008 Hi, I wrote some development code using class level css, this was applied to a html 'select' element. The 'padding' attribute was accepted fine. However when moving over to my site (presumably because of w3c tag) it is ignored. What should be used instead? .select_img { background-repeat: no-repeat; padding:3; text-align:right; } P.S. I'm putting images in the background: ... <option class='select_img' style='background-image:url(".$base."myimg.gif);'>The Choice</option> ... Quote Link to comment Share on other sites More sharing options...
phpQuestioner Posted February 7, 2008 Share Posted February 7, 2008 You can set the height, width and text size; then it will automatically create some padding. Quote Link to comment Share on other sites More sharing options...
TheFilmGod Posted February 7, 2008 Share Posted February 7, 2008 why do you use inline css? You can simply add that in the class declartions... Quote Link to comment Share on other sites More sharing options...
tinker Posted February 7, 2008 Author Share Posted February 7, 2008 yip, 'height' does the job. I've also put this inline because it affects other things in the wrong way. TheFilmGod: Because each entry has a different image (and one is even a different height to the rest, so this tailors it perfectly) Thanks all! 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.