Hi Developers,
i tried text-indent style class for <select> <option> tag .. The following given code is working on Mozilla fire box browser, but it is not working on IE..
I am trying to build a tree structure in the list box with multiple levels and <OPTGROUP> does not support multiple levels.
Here is the example with multiple levels.
<html>
<head>
<title>Main </title>
<style>
.style {color:green;font-weight:bold}
.style1 {text-indent:45px;color:red;}
.style2 {text-indent:90px;color:blue;}
.style3 {text-indent:135px;color:green;}
</style>
</head>
<body>
<form name="form1">
<select name="retail" >
<option selected disabled value="">Tree Structure</option>
<option value="Father" class="style">Father</option>
<option class="style1" value="/retail/chandler/">Son 1</option>
<option class="style2" value="/retail/chandler/">Grand Son 1</option>
<option class="style2" value="/retail/chandler/">Grand Son 2</option>
<option class="style3" value="/retail/chandler/">Great Grand Son 1</option>
<option class="style3" value="/retail/chandler/">Great Grand Son 2</option>
<option class="style2" value="/retail/chandler/">Grand Son 3</option>
<option class="style1" value="/retail/chandler/">Son 2</option>
</select>
</form>
</body>
</html>
Please help me out by providing a solution to this issue.



Reply With Quote


Bookmarks