Grow your CSS skills. Land your dream job.

Javascript animated Divs trouble.

  • # April 23, 2009 at 3:15 am

    Hi,

    I’m pretty new to web design and javascript, I watched the Starry Night Video tutorial on this website that featured large images for a background that adjusted as you moved the browser window.

    I’ve done a similar thing with a large image background that adjusts with the browser. I’m using Java Script for an accordion menu and also to slide down the main window. PROBLEM. When the main window animates down the background image gets warped, lines appear. Works fine if I don’t use the ‘repeat 20% 20%’ but I like the effect:

    [img]http://www.get-over.net/Images/over/shot1.jpg[/img]
    [img]http://www.get-over.net/Images/over/shot2.jpg[/img]

    any help.

    CSS Part:

    Code:
    body {
    font-family: Geneva, Arial, Helvetica, sans-serif;
    font-size:11px;
    line-height:15px;
    background:url(images/face.jpg) repeat 20% 20%;
    text-align:left;
    }

    HTML

    Rob
    # April 23, 2009 at 4:40 am

    you dont have a live link by chance do you? Just kinda like pokin stuff with a stick, I mean firebug lol

    # April 23, 2009 at 9:10 am

    Just put something up:

    http://www.get-over.net/Tester/index.html

    Pretty sketchy but I’m still honing my skills. Any help or suggestions is greatly appreciated. Thanks

    Rob
    # April 23, 2009 at 3:08 pm

    mmm link not working? :(

    # April 23, 2009 at 11:33 pm

    Not sure man, I tried the link on a different computer and it worked fine:
    http://www.get-over.net/Tester/index.html
    Not sure if being in Australia would have any bearing on this.

    Rob
    # April 28, 2009 at 4:19 am

    works now :D

    Its coz you have your background position as a %, its some strangely weird issue – which is well above my head lol

    If you set a solid PX to the background pos instead of % then it works lovely, the only problem is you loose the reason you have a % position lol

    I dunno how to get round that one dude… unless you dont mind having a more fixed bg… I will give it a think through again when its not so early in the morning…

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".