why this alignment is not working in IE?

Please see the attached code, the alignment is not working in IE. but it works in FF fine. Can you check?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-gb" lang="en-gb" >
<head>
  <meta http-equiv="content-type" content="text/html; charset=utf-8" />

  <title>Test</title>


</head>
<body id="page_bg" class="color_blue bg_blue width_fmax">
<a name="up" id="up"></a>
<div class="center" align="center">
	
				<div id="whitebox_m">
					<div id="area">
									

						<div id="leftcolumn">
														
							
									<div class="module">
			<div>
				<div>
					<div>
											
<script language="javascript" type="text/javascript">
	function checkForm(thisform) {
		// do field validation
		/*if (thisform.sel_hour.value == ""){
			alert( "Enter Search Word" );
			return false;
		} else {
			return true;
		}
	*/
	}
</script>
<script language="javascript" src="/jobline/jobselect.js"></script>

<div style="width:150px;">
    <div class="moduletablesearchoptions">  
        
			     
 <script type="text/javascript">
        function resizesel(el, newwidth){
        document.getElementById(el).style.width = newwidth + "px";
        }
 </script>
		<form method="get" action="index.php" onSubmit="return checkForm(this);" name="searchForm">
	<div class="searchsearch">
		<table width="100%" border="0">
		  <tr>
		    <td>
						<div style="position: relative;padding-left:0px;">
        		<div style="position:absolute;left:0;">	
					<select style="width: 175px" name="sel_region" id="sel_region" class="textboxsubject" onfocus="resizesel('sel_region', '175')" onblur="resizesel('sel_region', '175')">
							<option selected="selected" style="color:#999999;">Region or School</option>
															<option style="font-weight:bold; color:#000000;" value="7^1">
							<ul>
								<li >
										East Midlands (all)										<ul>
											<li class="folder">
											&nbsp;&nbsp;
											<option value="8^0" style="padding-left:10px;">Kettering Buccleuch Ac.</option>
											</li>
										</ul>
															<ul>
											<li class="folder">
											&nbsp;&nbsp;
											<option value="9^0" style="padding-left:10px;">Lincoln Minster School</option>
											</li>
										</ul>
															<ul>
											<li class="folder">
											&nbsp;&nbsp;
											<option value="10^0" style="padding-left:10px;">Northampton Academy</option>
											</li>
										</ul>
						
					</li>
				</ul>
				
				</option>
											<option style="font-weight:bold; color:#000000;" value="8^1">
							<ul>
								<li >
										East of England	
					</li>
				</ul>
				</option>
											<option style="font-weight:bold; color:#000000;" value="9^1">
							<ul>
								<li >
										Greater London (all)										<ul>
											<li class="folder">
											&nbsp;&nbsp;
											<option value="11^0" style="padding-left:10px;">Lambeth Academy</option>
											</li>
										</ul>
															<ul>
											<li class="folder">
											&nbsp;&nbsp;
											<option value="12^0" style="padding-left:10px;">Paddington Academy</option>
											</li>
										</ul>
						
					</li>
				</ul>
				
				</option>
											<option style="font-weight:bold; color:#000000;" value="10^1">
							<ul>
								<li >
										North East England (all)	
					</li>
				</ul>
				</option>
											<option style="font-weight:bold; color:#000000;" value="11^1">
							<ul>
								<li >
										North West England (all)	
					</li>
				</ul>
				</option>
											<option style="font-weight:bold; color:#000000;" value="12^1">
							<ul>
								<li >
										South East England (all)	
					</li>
				</ul>
				</option>
											<option style="font-weight:bold; color:#000000;" value="13^1">
							<ul>
								<li >
										South West England (all)	
					</li>
				</ul>
				</option>
											<option style="font-weight:bold; color:#000000;" value="14^1">
							<ul>
								<li >
										West Midlands	
					</li>
				</ul>
				</option>
											<option style="font-weight:bold; color:#000000;" value="15^1">
							<ul>
								<li >
										Yorkshire & Humber (all)	
					</li>
				</ul>
				</option>
								</select>
				</div>
			</div>
			<br />&nbsp;			</td>
	      </tr>
		<tr>
		   <td>		   </td>
		 </tr>  		
		</table>
	</div>	
		</form>
	</div>
</div>		   
 
 


</body>
</html>

Open in new window

FF.JPG
IE.JPG
LVL 36
Loganathan NatarajanLAMP DeveloperAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Shinesh PremrajanEngineering ManagerCommented:
i think you are looking for something like the code attached

hope this helps
<select name="test">
<optgroup label="Header">Header</optgroup>
<option value="content"> contenta</option>
<optgroup label="Header2">Header2</optgroup>
</select>

Open in new window

0
Shinesh PremrajanEngineering ManagerCommented:
My apologies, pls find the corrected code..


<select>
  <optgroup label="Swedish Cars">
    <option value="volvo">Volvo</option>
    <option value="saab">Saab</option>
  </optgroup>
  <optgroup label="German Cars">
    <option value="mercedes">Mercedes</option>
    <option value="audi">Audi</option>
  </optgroup>
</select>

Open in new window

0
Loganathan NatarajanLAMP DeveloperAuthor Commented:
@shinuq

thanks ...

can I load some values for this name also?

because i need to get this value on the next page?

i.e
0
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

Shinesh PremrajanEngineering ManagerCommented:
AFAIK, the optgroup values are not readable, only the option values can be retrieved.
0
Loganathan NatarajanLAMP DeveloperAuthor Commented:
No, I want to read the values also for the main option.

as I am combining both options as ROOT and SUB...

Is there any way to do?
0
Shinesh PremrajanEngineering ManagerCommented:
Pls refer the snippet, actually when a value is selected, you need to split it by the "_" separator here, Then you can get both the values.

Hope this helps
<select>
  <optgroup label="Swedish Cars">
    <option value="SwedishCars_volvo">Volvo</option>
    <option value="SwedishCars_saab">Saab</option>
  </optgroup>
  <optgroup label="German Cars">
    <option value="GermanCars_mercedes">Mercedes</option>
    <option value="GermanCars_audi">Audi</option>
  </optgroup>
</select>

Open in new window

0
Loganathan NatarajanLAMP DeveloperAuthor Commented:
Actually my need is different.  As I said, I need to get exactly the selection of the option,

if it is ROOT selection, I have to search under the SUB's
If it is SUB (individual) , i have to search in it.
0
Pieter MaraisLead DeveloperCommented:
Hi there,

Styling option elements of select elements is quite complicated, as it is not  fully supported by all browsers, eg. IE and Safari. The best one can try to do is to change the colors of the options to draw attention the them. I have added an example of the dropdown as a code snippet. It is a little less complicated than the one you are currently using with a bit of styling, but I assume you have used the UL and LI elements for a reason.

Hope it helps ^_^
<select style="width: 175px" name="sel_region" id="sel_region" class="textboxsubject" onfocus="resizesel('sel_region', '175')" onblur="resizesel('sel_region', '175')">
    <option selected="selected" style="color:#999999;">Region or School</option>
    
    <option value="7^1">East Midlands (all)</option>
        <option value="8^0" style="color:#666666;">&nbsp;&nbsp;Kettering Buccleuch Ac.</option>
        <option value="9^0" style="color:#666666;">&nbsp;&nbsp;Lincoln Minster School</option>
        <option value="10^0" style="color:#666666;">&nbsp;&nbsp;Northampton Academy</option>
                    
    <option value="8^1">East of England</option>
    
    <option value="9^1">Greater London (all)</option>
        <option value="11^0" style="color:#666666;">&nbsp;&nbsp;Lambeth Academy</option>
        <option value="12^0" style="color:#666666;">&nbsp;&nbsp;Paddington Academy</option>

    <option value="10^1">North East England (all)</option>

    <option value="11^1">North West England (all)</option>
    
    <option value="12^1">South East England (all)</option>		
            
    <option value="13^1">South West England (all)</option>	

    <option value="14^1">West Midlands</option>
                    
    <option value="15^1">Yorkshire & Humber (all)</option>
</select>

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Loganathan NatarajanLAMP DeveloperAuthor Commented:
thanks
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
JavaScript

From novice to tech pro — start learning today.