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 Link to comment https://forums.phpfreaks.com/topic/194136-drop-down-menu/ 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. Link to comment https://forums.phpfreaks.com/topic/194136-drop-down-menu/#findComment-1021476 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.