rascle Posted March 4, 2010 Share Posted March 4, 2010 Hi I want to add a small icon into a row in the drop down menu: I tried using this: <?php echo" <select size='1' style='width:190px' name='mood' value='$logged[mood]' class='input1'> <option value='select'"; if($logged[mood] == "select"){ echo "selected"; } echo ">Select A Mood...</option> <option value='Happy' style='background-color: #666666; background-image: url(http://www.rasclerhys.com/webimages/delete.png); background-repeat: no-repeat;background-attachment:fixed;background-position:centered;color:#FFFFFF; ' "; if($logged[mood] == "Happy") { echo "selected"; } echo ">Happy</option> </select> "; ?> And i can get the background and the text to change colour, i just cant get the image to display. What should i do to get this to work (i would prefer not to have to use javascript or another language unless it isnt possible to do it in CSS and HTML) Thanks -Rhys Quote Link to comment Share on other sites More sharing options...
rascle Posted March 4, 2010 Author Share Posted March 4, 2010 i decided to use a simple javascript code that can be found: http://javascript-array.com/scripts/simple_drop_down_menu/ there, and i just added an image in between <a href=""> and the text. 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.