Page 1 of 1

IE 8 css problem

PostPosted: Mon Jul 05, 2010 2:45 am
by atticus
Hi guys,

I am having a css problem in IE 8. The code below runs on FF without a problem. However it seems that in IE 8 the css style is not applied to the select element.
Do you know what could cause the problem in IE 8? I want it to be compatible with both browsers.

Here's the code:

Code: Select all
<html>
<body>
   <style type="text/css">
   .highlight{
      border-style: solid;
      border-width: 2px;
      border-color: #FF0000;
   }
   </style>
   <table>
      <tr>
         <td>
            <select class="highlight" >
            <option></option>
            <option value="125" >Test1 - Test2</option>
            </select>
         </td>
      </tr>
   </table>
</body>
</html>


Thanks,
atticus

Re: IE 8 css problem

PostPosted: Thu Jul 08, 2010 10:55 am
by thedotmaster
Use a DOCTYPE. Currently your page is running in quirks mode.

http://www.w3schools.com/tags/tag_DOCTYPE.asp <-- get doctype from here
http://validator.w3.org/ <-- validate your page here