Results 1 to 2 of 2

Thread: IE background stretching bug fix for HTML not PHP

  1. #1
    scottie5689 is offline New Member: Posts Will Be Moderated
    Join Date
    Apr 2011
    Posts
    2

    IE background stretching bug fix for HTML not PHP

    I am developing a website where my background need to stretch to the fit all windows no matter size or browser. I originally started with CSS3 background-size property. It worked fine but not in IE. I found the IE fix,

    <style type="text/css">
    html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    }
    </style>


    <img src="bgimage.jpg" alt="background image" id="bg" />
    </body>

    mg#bg {
    position:fixed;
    top:0;
    left:0;
    width:100%;
    height:100%;
    }


    This worked fine when placed in a html page. However, when the image is placed into a PHP page and linked to the CSS it does not work. I get a broken image link box but no image. I have tried it now with png and gif image types. I know HTML and CSS well, not so much PHP.

  2. #2
    Join Date
    Feb 2006
    Location
    Salisbury UK
    Posts
    4,332
    This is a duplicate topic. I've answered your other topic.
    Code downloaded to my PC will be deleted in due course.
    WIN7; IE9, Firefox, Opera, Chrome and Safari for Windows; screen resolution usually 1366*768.
    Also IE6 on W98 with 800*600 and IE8 on Vista 1440*900.

Similar Threads

  1. IE background fix for HTML not PHP
    By scottie5689 in forum Web Design, HTML Reference and CSS
    Replies: 1
    Last Post: 21 Apr 2011, 01:06 AM
  2. Stretching background
    By niv in forum Web Design, HTML Reference and CSS
    Replies: 1
    Last Post: 20 Feb 2011, 07:59 PM
  3. Need css bug fix!
    By asakub11 in forum Freelancing
    Replies: 0
    Last Post: 07 Jun 2008, 03:59 AM
  4. Bug fix tools
    By tester_geniusd in forum Web Design, HTML Reference and CSS
    Replies: 1
    Last Post: 12 Apr 2006, 04:39 AM

Posting Permissions

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