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> ... Link to comment https://forums.phpfreaks.com/topic/89846-solved-select-padding/ 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. Link to comment https://forums.phpfreaks.com/topic/89846-solved-select-padding/#findComment-460445 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... Link to comment https://forums.phpfreaks.com/topic/89846-solved-select-padding/#findComment-460451 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! Link to comment https://forums.phpfreaks.com/topic/89846-solved-select-padding/#findComment-460468 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.