Fixed background

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

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.
 
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">
 

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.
 
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.
 

alicez

Thread Starter
Joined
Jul 12, 2008
Messages
771
Yes it works for both browsers and forget Front Page embedding the code is better. And it's placed in the body.
#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?
 
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.
 

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!
 

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!
 
Joined
Oct 20, 2011
Messages
684
Doesn't that just put the image in the upper left, rather than filling the whole background?

All so confusing!
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>
 

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.
 
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>
That's the code I told you to use. Glad you got it to work! ;)
 

alicez

Thread Starter
Joined
Jul 12, 2008
Messages
771
Should that "script" go into the body, underneath the </HEAD>?
 
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.
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

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 807,865 other people just like you!

Latest posts

Members online

Top