treehouse : what would you like to learn today?
Web Design Web Development iOS Development

Is it Possible?

  • Is it possible to make a marquee with a image in the background of my site. I also want to do with with my sites MySpace

    <MARQUEE style=\"background-color:transparent; color:transparent; width:500px; height:50px; \" direction=\"right\" behavior=\"scroll\" scrollamount=\"1\" ><img src=\"null\"><img src=\"http://www.filmgrenade.com/wp-content/uploads/2008/07/moon_monster_milkbox.png\"></MARQUEE>


    (ABOVE CODE)I cant make this the background of my site... I want to make it go in the top left corner

    body{background: transparent url(http://www.filmgrenade.com/wp-content/uploads/2008/07/moon_monster_milkbox.png);
    background-color: 1b1b1b;
    background-position: top left;
    background-repeat: no-repeat;
    }


    this is the static image...it just stays on the top left even when scrolling but i want it to move like a marquee.

    if anyone is wondering why i am doing this, i am trying to make it look like the moon is moving across the sky during the time visitors are on my site.

    hope someone could help

    thanks :D
  • marquee is a deprecated HTML element, so its use is frowned upon. It's both a styling element and behavioural and has no place in modern HTML mark-up.
    You could use an animated gif? Or a flash animation which, given that it's purely a design feature I don't see any problems with accessibility with using flash in this case.
    If you wanted to use coding for such a design, then I would class a moving image as behavioural content so you might look at javascript to move your image across the screen.

    I'd be inclined to use flash in this case - and I don't say that often :p lol