Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New to the CF scene
    Join Date
    Dec 2002
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Issue with CSS in IE

    Hi
    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">

    <html>
    <head>
    <title>Sample</title>
    <style type="text/css">
    .tablestyle{
    position:relative;
    height:100%;
    width:100%;
    }
    </style>
    </head>
    <body>

    <table border="1" id="abc" class="tablestyle">
    <tr><td>Hai1</td></tr>
    <tr><td>Hai2</td></tr>
    <tr><td>Hai3</td></tr>
    <tr><td>Hai4</td></tr>
    <tr><td>Hai5</td></tr>
    </table>
    </body>
    </html>

  • #2
    New Coder
    Join Date
    Aug 2006
    Posts
    64
    Thanks
    0
    Thanked 1 Time in 1 Post
    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
    Last edited by percepts; 09-20-2006 at 02:53 PM.

  • #3
    New to the CF scene
    Join Date
    Dec 2002
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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

  • #4
    New Coder
    Join Date
    Aug 2006
    Posts
    64
    Thanks
    0
    Thanked 1 Time in 1 Post
    yes use the second option I gave you which is to put a comment above the dtd.

  • #5
    Senior Coder
    Join Date
    Jan 2005
    Location
    Memphis, TN
    Posts
    1,788
    Thanks
    8
    Thanked 131 Times in 129 Posts
    Code:
    html, body {
    height: 100%;
    }
    add that to your css and see if works.
    Stop making things so hard on yourself.
    i is tugbucket :: help raise tugburg :: Whitehaven Kiwanis


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •