|
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">□ 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>
<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
Navigation:
[Reply to this message]
|