Results 1 to 4 of 4

Thread: full size image web page with the text scrolling?

  1. #1
    Join Date
    Jan 2009
    Location
    NH
    Posts
    675
    Thanks
    98
    Thanked 26 Times in 26 Posts

    Question full size image web page with the text scrolling?

    I hope I am describing this correctly. I want to use a full size image as a web page background and then have the text overlay the image, so that if there is a lot of text that it scrolls up or down and the image stays put.

    How can I do this with HTML and CSS? and/or something maybe Javascript? Whatever is the easiest solution would be great.

    I uploaded an image here of 1 page http://i43.tinypic.com/a4osbb.jpg so you can see what I mean. I want that black and white logo in the center container to stay put while you scroll down on longer pages.

    thanks in advance.
    Mike

  2. #2
    Join Date
    Jan 2009
    Location
    NH
    Posts
    675
    Thanks
    98
    Thanked 26 Times in 26 Posts

    Default

    I added
    Code:
    background-attachment:fixed;
    and it seems to do just what I want. Will that work in all browsers?

    example page is at : http://www.pscompetitiveedge.com/references.html

    BTW - there is a sound clip that play automatically, so turn your speakers down if you don't want to hear it.

  3. #3
    Join Date
    Nov 2011
    Location
    Buenos Aires
    Posts
    15
    Thanks
    0
    Thanked 1 Time in 1 Post

    Default

    Hello, yes the trick is use background:url().... remember your image needs to fix the background

  4. #4
    Join Date
    Oct 2011
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Nice solution, I haven't known yet how to fix the background image. Much helpful, thanks for the example)
    Btw, I've always wondered why people add automatic sound playing on their sites? Frankly speaking, this annoys me pretty much, so I always tend to quit such pages as soon as possible rather than turn off my speakers
    Anyway, I'd like to know how do you add this sound to a page? Is it something about Javascript? Cos while learning HTML I haven't yet come across this..

Bookmarks

Posting Permissions

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