PDA

View Full Version : Background static?



starcreative
03-23-2011, 12:56 AM
"This was posted in another thread and I wanted to ask a question but it was closed"

This was the question:

I am making a website and i have added a background by right clicking and going to page properties then adding a background that is the same width as my page but if I scroll down, my background is copied as i scroll down. What i want is for the background to stay put and only the content on the page scrolls down.

Can someone help me please?


This was the answer and I have tried it over and over and it is not working:

Go in Page HTML and add the following code in the Inside Body of the page HTML:

background-attachment: fixed;
background-repeat: no-repeat;

What is the solution for a background image to not repeat in BlueVoda?

LadyEye
03-23-2011, 04:09 AM
You say you tried this .. ??

Simple solution! (http://www.vodahost.com/vodatalk/bluevoda-tips-tricks-shortcuts/61103-background-static.html)

Go in Page HTML and add the following code in the Inside Body of the page HTML:

background-attachment: fixed;
background-repeat: no-repeat;

starcreative
03-24-2011, 08:04 AM
It's not working unless I'm asking the wrong question.

I put it up here alexbookworm.com/header.html

All I have on the page is the backround with the code in the inside body.

You will see the orange bar repeating.

Collectors-info
03-24-2011, 01:35 PM
Not sure if what you are asking is on this page (http://metestsite.co.uk/static-background-image-on-scroll.html)? If so the instructions are at the bottom of the page. (Scroll down)

starcreative
03-29-2011, 07:38 PM
Thanks. I updated it with this code.

What is weird is that it is not at the top of the page.

How can I just have this background image simply not tile?

Collectors-info
03-29-2011, 07:50 PM
Just place it on the front of your page & send to back if you already have items there.

starcreative
03-31-2011, 06:59 AM
Thanks for helping collectors info.

I did that and here it is: alexbookworm.com/header.html

The problem is it's not a background now so when I have the page centered it does not stretch across the entire page.

Doesn't it have to be a background? But I don't want it to tile :)

Tom Finley
03-31-2011, 07:23 AM
Starcreative...

I just looked at your page. I'm wondering if you are trying to make a header that dynamically adjusts to the width of any screen? If so, BlueVoda is not capable of that. What BV can do is tile a very narrow, long image across the screen so that the header (or background) appears to adjust to screen width. The header image you have can't be recreated to work as you wish, if this is what you are trying to do.

Also, the image you have (I like the way it looks, btw) is much too wide. You have the width of the page set at 800px--that's as wide as the image should be. Practically, 960px is as wide as a page should be, in order to be viewable by the vast majority of screens without side-to-side scroll bars.

Collectors-info
03-31-2011, 09:27 AM
Toms right, you can only do this if you have a square or oblong object that will repeat its self. A right angle shape wont do this without look odd. Might be worth a redesign on style if you need this.

starcreative
03-31-2011, 09:48 AM
You guys are helpful.

Lets say I have a 10x10 pixel and I tile it so it covers the entire background...

Is there a code to plug into the html that will simply keep it from tiling? So there would just be a 10x10 box in the left top corner?

Collectors-info
03-31-2011, 10:02 AM
Is there a reason to have just 1 10x10 image on the page??????

starcreative
03-31-2011, 10:16 AM
Hey Collectors-info the answer would be no.

I explained it that way to make it easy to understand.

I want to apply it to a different size background image.

Is there a code to plug into the html that will simply keep a background from tiling?

starcreative
03-31-2011, 10:40 AM
Figured it out. Here it is if you want to see it.

Thanks.

alexbookworm.com/header2.html

mustofa
06-16-2011, 01:00 PM
"This was posted in another thread and I wanted to ask a question but it was closed"

This was the question:

I am making a website and i have added a background by right clicking and going to page properties then adding a background that is the same width as my page but if I scroll down, my background is copied as i scroll down. What i want is for the background to stay put and only the content on the page scrolls down.

Can someone help me please?


This was the answer and I have tried it over and over and it is not working:

Go in Page HTML and add the following code in the Inside Body of the page HTML:

background-attachment: fixed;
background-repeat: no-repeat;

What is the solution for a background image to not repeat in BlueVoda?
To get background fixed works on BV you can edit index.html on your webhost control panel within body tag.

So it looks like this:

body
{
text-align: center;
margin: 0;
background-attachment: fixed;
background-repeat: no-repeat;
}

Or you can edit preview.html on C:\users\......\appdata\local\temp\preview

Check out my test page (http://terminalmusik.co.cc/lagu-populer/b/baginda/)
http://terminalmusik.co.cc (http://terminalmusik.co.cc/)
(under construction)