Jump to content

Drop Down menu


rascle

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.