www.webdeveloper.com
Results 1 to 13 of 13

Thread: Background image doesn't appear

  1. #1
    Join Date
    Nov 2002
    Location
    Singapore
    Posts
    44

    Angry Background image doesn't appear

    Here's the faulty page: http://caesar3bsc.150m.com/main.html

    The problem is that there should be a background image with y-repeat on. If you check the source code you will know what I mean. The problem is that the image doesn't load. It's strange because I used to be able to see it. Now I can't.

    Can anybody please point out what I'm doing wrong?

  2. #2
    Join Date
    Nov 2002
    Location
    Singapore
    Posts
    44
    Aargghh all my other pages won't display the image too! I didn't have this problem before. And I'm 100% sure that the image is uploaded and the URL is perfectly correct.

    What's wrong?

  3. #3
    Join Date
    Nov 2002
    Posts
    631
    It works fine for me. I can see it. what browser are you using?

  4. #4
    Join Date
    Nov 2002
    Posts
    18
    Hi Xeenslayer,

    What I'm seeing is the home page shows forest2.jpg on the left side, under the menu, while the other pages show the full page background with forest2.jpg. Looking at your source, the homepage is pulling the background image in via css, while the other pages are using html body attributes.

    Also, css attribute properties need to have a semi-colon between them. If it's missing, some browsers will refuse to display any css after the missing semi-colon.

    Try changing this:
    body {background:#000080 url(forest2.jpg) repeat-y -10% 100%; }


    to this:
    body
    {
    background-image: url(forest2.jpg);
    background-repeat: repeat-y;
    }

  5. #5
    Join Date
    Nov 2002
    Posts
    984
    Originally posted by lcole
    Try changing this:
    body {background:#000080 url(forest2.jpg) repeat-y -10% 100%; }
    That is actually 100% correct.

    BTW, I also see the image (tested with Gecko, IE 5.5 and Opera 7b).

    However I do see large problems on the page depending on available screensize. You should probably look at what happens at your page in eg 1024 resolution.
    // Stefan Huszics

  6. #6
    Join Date
    Nov 2002
    Location
    Singapore
    Posts
    44
    I use IE5. It's strange. Sometimes I see the image, sometimes I don't. Usually when I type the URL as http://URL, the page doesn't show the image.

    If I type www.URL, it does. Is it a problem with the HTML or my browser??

  7. #7
    Join Date
    Nov 2002
    Location
    Singapore
    Posts
    44
    Oh uh, Stefan, I did try to fix the resolution problem, but I still haven't the faintest idea how to do it. If you remember, I asked about it in the old forums.

  8. #8
    Join Date
    Nov 2002
    Posts
    984
    Originally posted by Xeenslayer
    I use IE5. It's strange. Sometimes I see the image, sometimes I don't. Usually when I type the URL as http://URL, the page doesn't show the image.

    If I type www.URL, it does. Is it a problem with the HTML or my browser??
    IE 5 is old an buggy.
    I would upgrade to at least 5.5.
    Or better yet, get a gecko browser.

    K-Meleon will even share your IE bookmarks nicely
    http://kmeleon.sourceforge.net/
    // Stefan Huszics

  9. #9
    Join Date
    Nov 2002
    Posts
    984
    Originally posted by Xeenslayer
    Oh uh, Stefan, I did try to fix the resolution problem, but I still haven't the faintest idea how to do it. If you remember, I asked about it in the old forums.
    No I don't remember, but you should start with stopping that <table> abuse of yours.

    Then use CSS on the body to limit the area used by the main text and position your (non table) menu to the left side to an area outside the "main text area".
    // Stefan Huszics

  10. #10
    Join Date
    Nov 2002
    Location
    Singapore
    Posts
    44
    Then use CSS on the body to limit the area used by the main text and position your (non table) menu to the left side to an area outside the "main text area".
    How do I do that? I'm not quite sure what you mean by "using CSS on the body to limit the area used by the main text".

  11. #11
    Join Date
    Nov 2002
    Location
    NZ
    Posts
    26
    CSS tutorial @ w3,org
    It's what I'm reading to figure that sort of thing out.
    smurfy
    here to learn.
    'Puter not working right?
    See us at VirtualDr.

  12. #12
    Join Date
    Nov 2002
    Location
    England
    Posts
    275
    I think he means something like this:

    CSS:
    Code:
    body {
      margin-left: 10em;
    }
    #menu {
      position:absolute;
      top:1em;
      left:1em;
      width:8em;
    }
    HTML:
    Code:
    <body>
      <p>Main body text</p>
    
      <div id="menu">
        <p>Menu links here</p>
      </div>
    </body>

  13. #13
    Join Date
    Nov 2002
    Location
    Singapore
    Posts
    44
    Again I'm getting worried by the position and sizes of things appearing on different browsers.

    I'll post a topic in the CSS forum, and thanks for that link, Smurfy.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles