1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Fixed background

Discussion in 'Web Design & Development' started by alicez, Nov 1, 2011.

Thread Status:
Not open for further replies.
Advertisement
  1. alicez

    alicez Thread Starter

    Joined:
    Jul 12, 2008
    Messages:
    771
    I've tried several "fixed" HTML background for my site.

    Some allow the background to stay "fixed" when viewed in IE, but in FF the background moves downward as the page moves downward.

    Is there one definite HTML I could use that would keep the background FIXED in both IE and FF?
    Something not too complicated that I could use? (I am not that knowledgeable about computers and HTML and CSS, etc.)

    One I've tried is:
    <body background="http://www.XXXX.gif" bgproperties="fixed">
    Works in IE, but not in FF.


    Another I tried is:

    <STYLE TYPE="text/css">
    body {background-image: url("http://www.XXX.jpg"); background-attachment: fixed;}
    </style>

    But that one, when I am IE, and click to go back to previous page, doesn't show the background image at all on the page (I went back to, even though fixed background was there when I first looked at that page. (Does that make sense?)

    P.S. Does it make a difference where we place the "background" HTML script in the webpage? Before HEAD, after HEAD, top of BODY, etc?

    Thank you.
     
  2. VictoriaiiCe

    VictoriaiiCe

    Joined:
    Oct 20, 2011
    Messages:
    684
    If you use "Frontpage" then when you insert your background image, also click on "Watermark." This codes in the HTML to make the background fixed. But here's the correct html code: <body style="background-attachment: fixed; background-repeat: no-repeat;" background="xxx.jpg">
     
  3. alicez

    alicez Thread Starter

    Joined:
    Jul 12, 2008
    Messages:
    771
    Thank you.

    Will that:
    <body style="background-attachment: fixed; background-repeat: no-repeat;" background="xxx.jpg">

    make the background FIXED in both IE8 amd FF?

    And is it placed in the 'body' of the all the HTML code?

    Also, what is "FrontPage?" (I don't know much about computers, programs, etc.

    ADD-ON: I tried the <body style......> you gave me and it only puts the image in the upper left of the page. I wanted the image to cover the background of page, as it did with the other "script" I used.
     
  4. VictoriaiiCe

    VictoriaiiCe

    Joined:
    Oct 20, 2011
    Messages:
    684
    Yes it works for both browsers and forget Front Page embedding the code is better. And it's placed in the body.
     
  5. alicez

    alicez Thread Starter

    Joined:
    Jul 12, 2008
    Messages:
    771
    #1- Did you read my "Add-On" in my previous message?
    I used HTML you supplied and the image only shows in the upper left hand corner of page. I want (backgorund) image to fill the enitire page.

    #2- You said " and forget Front Page embedding the code is better."

    Did you mean I should "forget" about FrontPage? What is FrontPage" Is it a program? Is it Free? Can anyone use it? How do I get it if it is free. Can I use it online?
     
  6. VictoriaiiCe

    VictoriaiiCe

    Joined:
    Oct 20, 2011
    Messages:
    684
    Sample:
    <html>
    <style type="text/css">body { background-image: url():
    background-repeat: repeat-n; background-attachment: fixed;
    }
    </style>

    Ok...I know coding is frustrating if you are using an external style sheet (also known as "linked") and you want ALL of your web pages to use this effect, place the following code within your external stylesheet body tag: body { background-attachment: fixed;
    background-image: url(imagename.gif);
    background-repeat: repeat;}
    If you want to use this effect only on a handful of pages, use the internal style sheet method, by placing this code between your HEAD tags

    <style type="text/css">
    body
    {background-image:
    url("imagename.gif");
    background-attachment: fixed;}
    </style>

    Also frontpage is a program used to create websites I wasn't sure if you were using it or not so its irrelevant.
     
  7. alicez

    alicez Thread Starter

    Joined:
    Jul 12, 2008
    Messages:
    771
    Thank you.

    Is this what I should put in?

    body { background-attachment: fixed;
    background-image: url(imagename.gif);
    background-repeat: repeat;}

    (Exactly like that?)


    And it will make the small image/pciture fill the entire background both in IE8 and FF?

    Please bear with me as this is all new to me!
     
  8. VictoriaiiCe

    VictoriaiiCe

    Joined:
    Oct 20, 2011
    Messages:
    684
  9. alicez

    alicez Thread Starter

    Joined:
    Jul 12, 2008
    Messages:
    771
    Doesn't that just put the image in the upper left, rather than filling the whole background?

    All so confusing!
     
  10. VictoriaiiCe

    VictoriaiiCe

    Joined:
    Oct 20, 2011
    Messages:
    684
    What image are you using- you have to set the position (center, upper left, titled, strectched etc.) Can you link me to the image you're using?

    here's an example of a html page code I just made with you avatar as the BG image:

    <html>
    <style type="text/css">body { background-image: url(http://attach.tsgstatic.com/image.php?u=416665&dateline=1252983017);background-attachment: fixed;}
    </style>


    <body>

    (Insert body)

    </body>

    </html>
     
  11. alicez

    alicez Thread Starter

    Joined:
    Jul 12, 2008
    Messages:
    771
    I was told by neighbor to use:

    <STYLE TYPE="text/css">
    body {background-image: url(
    http://www.picture.gif); background-attachment: fixed;}
    </style>


    Which uses a picture of any size to fill the entire background. I think I will use that as it seems to work in IE8 and FF


    I had been using
    <html><body background="http://www.image.jpg" bgproperties="fixed">

    which also worked in both but the background image didn't stay fixed, it kept scrolling in FF.

    Thanks for your help.
     
  12. VictoriaiiCe

    VictoriaiiCe

    Joined:
    Oct 20, 2011
    Messages:
    684
    That's the code I told you to use. Glad you got it to work! ;)
     
  13. alicez

    alicez Thread Starter

    Joined:
    Jul 12, 2008
    Messages:
    771
    Should that "script" go into the body, underneath the </HEAD>?
     
  14. VictoriaiiCe

    VictoriaiiCe

    Joined:
    Oct 20, 2011
    Messages:
    684
  15. VictoriaiiCe

    VictoriaiiCe

    Joined:
    Oct 20, 2011
    Messages:
    684
    Alice I taught myself html and css coding before I took courses- Trial and error and playing around with it myself got me through my courses with ease. It's tedious but once you get the hang of it- it's like riding a bike. I used to copy the page source of websites- save it- edit it and format it how I wanted it to look. lol You'll get the hang of it.
     
  16. Sponsor

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/1025024

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice