Search code examples
htmlinternet-explorer-7compatibility

IE7 CSS Compatibility


Let me start off by saying I'm not a web developer and I don't know much at all about comparability.

I've been asked if I can fix a problem with a website in IE7. It loads completely fine in all modern browsers, but they want to make sure it works perfectly in IE7 as well. It technically works fine, but it appears to load the initial content on one pass and then the style on a second pass. I guess I can't be positive if this is what it's doing.

Does anyone who has experience with browser compatibility have any idea if this can be remedied? The website is extremely basic, just HTML, CSS, and a little bit of JS.

If this is the case, is there an easy way to set everything to invisible until the page is done loading? I know you can do this with javascript and individual elements.


Solution

  • Include jQuery, put in, <HEAD> block:

    <script type="text/javascript" language="javascript" src="http://ajax.microsoft.com/ajax/jquery/jquery-1.3.2.min.js"></script>
    

    Hide the body in your HTML:

    <body style='display:none'>
    

    Unhide the body when the DOM is ready:

    <script type='text/javascript'>
    $(document).ready(function() { $(body).show() })
    </script>
    

    The danger is: if it's slow to load is people will leave before seeing the page.