PDA

View Full Version : fixed and centered background?



Syllied
04-14-2010, 03:32 PM
Hi all I have a new project that I will be working on and the client needs a fixed and centered image as the background. This needs to be functional in IE and FF. Here is a perfect example www.soccer.com (http://www.soccer.com) . Any help at all is appreciated as to how I can accomplish this in bluevoda.
Thanks.

DarrenC
04-14-2010, 04:04 PM
To centre the main page content you do this in page properties.

For the fixed background you need a bit of code.

Will you be using a repeating tile background or a single big image.

Let me know which, cus the code varies slightly.

Heres 2 examples

This one has a tiled background http://www.rpconstruction.org/
This one has a big image background http://www.ctpallets.co.uk/

Syllied
04-14-2010, 04:29 PM
...it should be a single image like at the ctpallets site. You would realise that the pallets image in the background there does not center as you resize the page though, like it does with the stadium image at www.soccer.com (http://www.soccer.com)
If I cannot get the effect like at soccer.com then I guess I would be forced to use the fixed at left option like at ctpallets.

DarrenC
04-14-2010, 05:01 PM
I think I kind of get what you mean. I am working on a site where the background has a curve in it and I just can't get it to sit right and centre according to the size of the monitor viewing it.

Any how here is the code I used in the pallet site

Paste this into the page html on each page > Between Head Tab

<style type="text/css">
body
{
background-image:url('http://www.yourdomain.com/images/backgroundimage.jpg');
background-repeat:no-repeat;
background-attachment:fixed
}
</style>

FTP the background image to get its url

Have fun!

Syllied
04-14-2010, 05:41 PM
DarrenC, Thunks much....I really don't know code (which is why I love BV so much :) ). I love solving puzzles though and using the code you supplied me and some other codes I have been looking at in here I think I have found the solution to what I am looking for and it may help you with your site as well. I inserted a line (in green) in the code you provided above and it works like a charm...

<style type="text/css">
body
{
background-image:url('http://www.yourdomain.com/images/backgroundimage.jpg');
background-repeat:no-repeat;
background-position: 50&#37; 50%;
background-attachment:fixed
}
</style>

Thanks again and all the best with your site.

touchedbyanangel
04-18-2010, 06:14 AM
I would like to ask a question here, if you don't mind. I want JUST a background image on my home page. How big should the image be? Just one image, not tiled. And what do you mean by "FTP the background image to get it's url"? Do I do this in the control panel? I haven't had to FTP anything yet so I'm not sure what to do.

DarrenC
04-18-2010, 11:15 AM
I would like to ask a question here, if you don't mind. I want JUST a background image on my home page. How big should the image be? Just one image, not tiled. And what do you mean by "FTP the background image to get it's url"? Do I do this in the control panel? I haven't had to FTP anything yet so I'm not sure what to do.

I'll use CT Pallets as an example - Here is the site http://www.ctpallets.co.uk/

Here is the background image I used so you can see how big it is - http://www.ctpallets.co.uk/images/background6.jpg

You will find FTP in BV. Go to tools > FTP Manager and connect. On the left you will see the folders and files on your hard drive and on the right you will see the folders and files relating to your website that are on the server. You simply find the image you want on the left and drag it accross to the right. In my example my image is called 'background6.jpg and I dragged it to the 'images' folder, hence the url is http://www.ctpallets.co.uk/images/background6.jpg

I hope this helps.

touchedbyanangel
04-18-2010, 05:25 PM
Thank you Darren. If I right click on your image it says 1600 x 1200. Is that what you started with? Another quick question about my files. It relates more to my computer folders. I've read a lot of things about "the right path" when it comes to urls so I just have a question about my Blue Voda folder on my harddrive. First of all I am using a new computer. Windows 7. The file system is a little different from Vista. This is how it looks:
>Libraries
>Documents
>My Documents
>Blue Voda
>Blue Voda
backups
images
>Templates
>nt6
images
Images
Templates
bv

My image properties say: C:\Users\Kathy\Documents\BlueVoda\BlueVoda\Images

Am I suppose to have BOTH of these Blue Voda folders?

DarrenC
04-19-2010, 08:27 AM
1) Yes or there abouts. You don't want to go to small cus the image will stretch and look nasty and you don't want to go too big cus the image will be to heavy in kb's

2) I can't really comment as I still use Vista. I would post a new thread so others here can advise you.

touchedbyanangel
04-23-2010, 01:17 AM
Thank you Darren. I really appreciate you answering my question. I just deleted one of the Blue Voda folders and it seems to be ok. As far as the fixed background goes....I printed out this thread so I can try it at another time. Thanks again. You were very helpful.

dandia
05-03-2010, 11:06 AM
Thank you for this thread, exactly what I wanted to do and simple to follow. I didn't leave the background in though as it was too strong and I couldn't find a way to "knock" it back easily. So for the moment I am going to leave page as it is but great information.
Thanks
Debbie