...

View Full Version : Quite new to CSS... so I don't have any 'code' !



MadLeo
07-31-2007, 03:58 PM
Hey everybody,

As you can see, I'm a new member. I have joined CodingForums because I'm in a bad need of help in CSS. I am starting in CSS and my first question was; how to make a floating background? I read the FAQ topics, but no help.

I don't know if that's the real 'definition' of what I mean. What I mean is whenever a use mouses up or down, the background follows with him.

Thank you for any help,

- Leo :thumbsup:

twodayslate
07-31-2007, 04:02 PM
Fixed background

http://www.w3schools.com/css/pr_background-attachment.asp
http://www.brownielocks.com/fixedbackground.html
http://www.depiction.net/tutorials/css/fixedbackground.php


body
{
background-image:
url('smiley.gif');
background-attachment:
fixed
}

MadLeo
07-31-2007, 04:13 PM
Wow, awesome! Thank you. :)

I re'pped' you.

twodayslate
07-31-2007, 04:23 PM
Thank you.

ahallicks
07-31-2007, 04:44 PM
Of course, if you wanted to be a little more concise you could add that in one line:



background: #FFFFFF url(images/background.gif) fixed center;


The center states the position of the background-image in relation to the browser.

MadLeo
07-31-2007, 06:37 PM
Of course, if you wanted to be a little more concise you could add that in one line:



background: #FFFFFF url(images/background.gif) fixed center;


The center states the position of the background-image in relation to the browser.
I figured it out, thanks though. :)

+rep

MadLeo
07-31-2007, 08:35 PM
Ok, I have a new question! How to make the background not repeat?

Thanks.

PappaJohn
07-31-2007, 08:40 PM
background: #FFFFFF url(images/background.gif) fixed center no-repeat;

MadLeo
07-31-2007, 08:40 PM
Thanks.

+rep



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum