Reply to Re: div in <option>?

Your name:

Reply:


Posted by Jonathan N. Little on 12/13/06 16:21

gehegeradeaus@gmail.com wrote:
> Hi,
>
> how can I get the following result without using an image :
> http://cmdstud.khlim.be/~bbrughmans/select.png ?
>
> I don't its possible to put a <div> into the <option> tag?

No.

Two option I can think of, but you will have to be content that they
will not work in IE.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
<meta http-equiv="content-language" content="en-us">

<title>Demo</title>

<style type="text/css">
/* not supported in IE */
#byFL:first-letter, #byFL OPTION:first-letter {
color: red;
}
#byBG, #byBG OPTION {
padding-left: 2em; background: white url(redbox.gif) no-repeat;
}


</style>
</head>
<body>
<form>
<select id="byFL">
<option value="1">&#9633; A sample 1</option>
<option value="2">&#9633; A sample 2</option>
<option value="3">&#9633;A sample 3</option>
<option value="4">&#9633; A sample 4</option>
</select>

<select id="byBG">
<option value="1">A sample 1</option>
<option value="2">A sample 2</option>
<option value="3">A sample 3</option>
<option value="4">A sample 4</option>
</select>
<form>
</body>
</html>


--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация