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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.