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
    Jul 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    DIV layout background-image problems

    Hi,

    My DIV layout is absolutely positioned. I'm having trouble with my layout backgrounds. I have 2 separate backgrounds: one that repeats over the whole page, and one that should repeat vertically to 100% of the content DIV's height. However, the latter stops after whatever screen resolution the viewer has. I know this is a widely-encountered problem, and there are several fixes to it, but I am having trouble applying them to this specific layout (I am not the best with CSS.) Some information is http://www.webmasterworld.com/forum83/200.htm here. I have tried giving the body 100% height like this page advises, as you can see in my stylesheet, but it didn't change anything. I'm really sorry if it's something simple that I'm missing, and for any messy code, but any help would be appreciated.

    Here is my layout (please ignore the positioning in IE for a few of the DIV layers, I haven't fixed it yet):

    http://under-the-sky.net/layouts/shim/

    Here is a direct link to my stylesheet:

    http://under-the-sky.net/layouts/shim/shim.css

    Thanks a bunch!

  • #2
    Regular Coder Jutlander's Avatar
    Join Date
    Jun 2007
    Location
    In my own sick little world :P
    Posts
    425
    Thanks
    1
    Thanked 12 Times in 12 Posts
    You have some errors and I believe they are the reason why it's not working. You've used the div #content several times. You can only use an ID one time. Wrap everything that are content in the #content div.

    You have this somewhere:

    Code:
     ...... background-image: url('stretch.gif'); style="background-repeat: repeat-y; background pos ......
    You've defined the style attribute twice, but haven't closed the first one. Again the validator would catch this.

    http://validator.w3.org/check?uri=ht.../layouts/shim/

    There cannot be spaces in ID and class names. Use - or _.

    It would be a really good idea to put a doctype on the page. Use this one:

    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
       "http://www.w3.org/TR/html4/strict.dtd">
    This is just for starters.

  • #3
    New to the CF scene
    Join Date
    Jul 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thank you so much! I never knew about all these things I've been doing wrong.. I've fixed all the errors, but I've got to get the page back to looking the way it was before. Then, hopefully, the background will repeat properly. Thanks again!


  •  

    Posting Permissions

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