SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Oct 2010
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Need an image to be fixed as the page scrolls?

    Okay, so I know I have no idea what I'm doing... that's why I'm here!

    Hendersonsaddle.com

    I want the background image to stay fixed in one place, so there is no overflow of the text off the image. If you look at the code, it's just an image placed in the back, not an actual background image. I couldn't get the background image to work and be transparent also.

    So either a way to fix the image on the page as it scrolls or a way to make a background image transparent would be useful.

    Also... I know I'm div and br happy. Right now I just want to get the page up, and make it spiffy later... it's so ugly right now ;-)

    Thanks for your help in advance! I'm exausted from trying to THINK!

  2. #2
    SitePoint Wizard Stomme poes's Avatar
    Join Date
    Aug 2007
    Location
    Netherlands
    Posts
    10,278
    Mentioned
    50 Post(s)
    Tagged
    2 Thread(s)
    You should still at least fix your doctype.
    <!DOCTYPE html PUBLIC "-//w3c//DTD HTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

    <html xmlns="http://www.w3.org/1999/xhtml">

    copy this:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">

    to make sure your future css etc don't get snagged by Quirks Mode.

    Anyway, I think you should take desert image, and in your image editor, make it look semi-transparent (use your background colour and lower the opacity of the image above it in a new layer... then flatter and save). Set it as a background image on the body (or html) element.

    Use the background css properties to set your desired settings... in this case, you'll want "fixed" for the position.

    Double check that everything you have on the page is still readable with that background image behind it (even faded, it does reduce contrast somewhat).

    As a side note, you may not want "Saddle" twice for your alt text. What does it mean if I'm listening to your page and I hear "saddle saddle"??? I'd consider leaving them alt="" since they are seemingly just decoration but in the HTML.

    I didn't look further down the page.


Tags for this Thread

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
  •