|
Posted by Jonathan N. Little on 10/26/07 16:57
jcage@lycos.com wrote:
> So if you wanted to have the following in your drop down menu with one
> that was indented, how might you do it? I haven't found anything that
> works and am hoping for help... TIA
>
> People
> Dogs
> Cats
> =>Kittens
>
Are you looking for OPTGROUP?
<select>
<optgroup label="People">
<option label="Men" value="men">Men</option>
<option label="Women" value="women">Women</option>
<option label="Children" value="children">Children</option>
</optgroup>
<optgroup label="Dogs">
<option label="Dogs" value="dogs">Dogs</option>
<option label="Bitches" value="bitches">Bitchs</option>
<option label="Puppies" value="puppies">Puppies</option>
</optgroup>
<optgroup label="Cats">
<option label="Toms" value="toms">Toms</option>
<option label="Queens" value="queens">Queens</option>
<option label=Kittens" value="kittens">Kittens</option>
</optgroup>
</select
Of course whether or not the list is indented is up to the UA.
Yes you can style the OPTION element if you are willing to accept that
IE users will not see the indent...
<style type="text/css">
option.sub { padding-left: 1.5em; }
</style>
<select>
<option>People</option>
<option>Dogs</option>
<option>Cats</option>
<option class="sub">Kittens</option>
</select>
Follow ups trimmed to ciwah and alt.html, topic doesn't have anything to
do with PHP...
--
Take care,
Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
Navigation:
[Reply to this message]
|