View Full Version : Issue with CSS in IE

09-20-2006, 03:10 PM
I am trying to display the table size as the size of the screen.
That is if the table has four rows then the four rows height should be automatically adjusted to occupy the size of the screen. Below sample perfectly works in Firefox but it is not working in IE.

Please pass your suggesstions to overcome this problem

If i remove the doctype it is working fine, but i want the DTD need to be included in my HTML page.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">

<style type="text/css">

<table border="1" id="abc" class="tablestyle">

09-20-2006, 03:43 PM
use this doc type instead.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

the above will force IE into quirks mode which solves the problem.

or if you really want to keep your original dtd just put the following comment above the dtd

<!-- run in quirks mode -->

as you can see from the comment, what it does is to force the browser (IE) to quirks mode which renders the doctype pointless in IE

09-20-2006, 04:34 PM
Since the doctype is generated by our framework, we can't remove or modify it. Is it possible to fix this issue with out altering the doctype

09-20-2006, 04:42 PM
yes use the second option I gave you which is to put a comment above the dtd.

09-20-2006, 05:15 PM
html, body {
height: 100%;

add that to your css and see if works.