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 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Oct 2007
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    CSS Rendering in Firefox and Internet Explorer

    Hey guys, is it true that the output for the above will be different in both browsers?

    Im trying to position a table right all the way to the top using CSS. Somehow, my desired output works in Firefox but not in Internet Explorer. The table doesnt stick all the way to the top edge in IE.

    What do u tink i should do?

    CSS Code:
    table {
    position: fixed;
    top: -1px;
    border-collapse:collapse;
    }

  • #2
    Senior Coder shyam's Avatar
    Join Date
    Jul 2005
    Posts
    1,563
    Thanks
    2
    Thanked 163 Times in 160 Posts
    Code:
    postion:fixed
    is not supported by IE
    You never have to change anything you got up in the middle of the night to write. -- Saul Bellow

  • #3
    New Coder
    Join Date
    Oct 2005
    Posts
    24
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by shyam View Post
    Code:
    postion:fixed
    is not supported by IE
    true and false

    position:fixed is supported in IE7 but not in IE6 and below.

    you can however overcome this lack with a few tricks:

    conditional comments to include a css file strictly for IE6

    the following example will include a different file for less than or equal to ie6 and then a different file if greater than ie6 (note that this code is very finiky and must be exact - the filename can be changed, the media can be changed and conditional comments do not work in the external CSS files)

    <!--[if lte IE 6]>
    <link rel="stylesheet" media="all" type="text/css" href="/main.ie.css" />
    <![endif]-->
    <!--[if gt IE 6]>
    <link rel="stylesheet" media="all" type="text/css" href="/IE7.css" />
    <![endif]-->

    as for the fixedosition itself here are the two examples from Beginning CSS by 2nd Edition by Richard York published by WROX (I'm not the author or have any affiliation with them, the book has just really helped me out in understanding a few things about CSS)

    div#fixed-top {
    position: absolute;
    top: expression(eval(documentElement.scrollTop) + 5);
    }
    div#fixed-bottom {
    position: absolute;
    bottom: auto;
    top: expression(
    (documentElement.scrollTop + documentElement.clientHeight - this.clientHeight) - 7
    );
    }


    HtH


  •  

    Posting Permissions

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