Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

CSS Forum


You are currently viewing our CSS Forum as a guest. Please register to participate.
Login



Reply
You know those backgrounds that start out fixed but turn into something repetitive?
Old 09-18-2009, 06:26 AM You know those backgrounds that start out fixed but turn into something repetitive?
Average Talker

Posts: 25
Trades: 0
That's what I want. I've seen a two-part background where the first part is some static image that occupies that top of the page, and when you scroll down, once you reach the bottom of that image, it is replaced with a continuous color or pattern. How is this done?
Fudge is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 09-18-2009, 08:41 AM Re: You know those backgrounds that start out fixed but turn into something repetitiv
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,519
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
there are a couple of ways. If you have an example take a look at the source code for the page to see.

My best guess would be a body background + a page header
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 09-18-2009, 10:28 AM Re: You know those backgrounds that start out fixed but turn into something repetitiv
senemedar's Avatar
Experienced Talker

Posts: 47
Name: Michał
Location: Unitet Kingdom
Trades: 0
This can be done on as many ways, as many people is on this forum (well, maybe a little less, but not much )
From the top of my head: set a background colour that is the colour at the end of your "static image" with the image together; then you simply position the background image where you want it (top in case you've described) and turn the repeat off.
__________________

Please login or register to view this content. Registration is FREE

home of senemedar
senemedar is offline
Reply With Quote
View Public Profile
 
Old 09-18-2009, 08:55 PM Re: You know those backgrounds that start out fixed but turn into something repetitiv
Average Talker

Posts: 25
Trades: 0
I will look into that. In the meantime take a look at this most exemplary of sites: www.studio7designs.com
Fudge is offline
Reply With Quote
View Public Profile
 
Old 09-18-2009, 09:01 PM Re: You know those backgrounds that start out fixed but turn into something repetitiv
Average Talker

Posts: 25
Trades: 0
This page appears to do it too: http://www.rock.cz/
Fudge is offline
Reply With Quote
View Public Profile
 
Old 09-19-2009, 06:36 AM Re: You know those backgrounds that start out fixed but turn into something repetitiv
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,519
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
7designs use layered elements with background images/colours to achieve that look.
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 09-19-2009, 06:39 AM Re: You know those backgrounds that start out fixed but turn into something repetitiv
Average Talker

Posts: 25
Trades: 0
In other words, over my head.

And the Czech site?
Fudge is offline
Reply With Quote
View Public Profile
 
Old 09-19-2009, 06:41 AM Re: You know those backgrounds that start out fixed but turn into something repetitiv
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,519
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
the same technique.
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 09-19-2009, 07:41 AM Re: You know those backgrounds that start out fixed but turn into something repetitiv
StylaStyla's Avatar
Mad Man

Posts: 401
Name: Styla
Location: City of London
Trades: 0
Quote:
Originally Posted by Fudge View Post
In other words, over my head.

And the Czech site?
re: Studio7 site.

They set the background of the body to #000 (black)
They also set the background of the body to also have an image (earth) with NO REPEAT, and positioned it to the center

so basically they now have a black background with a image at the top.. now for the image at the very bottom..

they then added divs (layers) to fill in the content and layout design.

then at the bottom they added a final div (probably #footer) to have a background image of the bottom of the earth

the code (from my estimate)

Code:
body {
background:#000;
background-image:url(earth.jpg) center top no-repeat;
}
HTML Code:
<div id="header"></div>
<div id="content"></div>
<div id="footer"></div>
with FOOTER having an image background set in the CSS.

but of course you need to float all of this correctly in order for it to be executed right.
__________________
Freelance Graphic Designer not for hire

Last edited by StylaStyla; 09-19-2009 at 09:01 AM..
StylaStyla is offline
Reply With Quote
View Public Profile Visit StylaStyla's homepage!
 
Old 09-19-2009, 06:52 PM Re: You know those backgrounds that start out fixed but turn into something repetitiv
senemedar's Avatar
Experienced Talker

Posts: 47
Name: Michał
Location: Unitet Kingdom
Trades: 0
Quote:
Originally Posted by Fudge View Post
In other words, over my head.
Don't be scared just because you saw a word "layer"! it's really easy, as you can see on The Conqueror's example...
__________________

Please login or register to view this content. Registration is FREE

home of senemedar
senemedar is offline
Reply With Quote
View Public Profile
 
Old 09-23-2009, 07:17 AM Re: You know those backgrounds that start out fixed but turn into something repetitiv
Average Talker

Posts: 25
Trades: 0
Conqueror,

I gave the first bit of code a try. My goal was simply to get the first part to work before even thinking about a bottom part. Even that, however did not work. I slipped the code into the style sheet that my blog uses right under the background color, and made sure the image URL was correct. But alas it did not show up. Any idea?

Thanks.
Fudge is offline
Reply With Quote
View Public Profile
 
Old 09-23-2009, 08:19 AM Re: You know those backgrounds that start out fixed but turn into something repetitiv
Average Talker

Posts: 25
Trades: 0
Success. With some tweaking, I got it to work. The next step is making it repeat horizontally. I want to post a simple gradient like a sky and have that stretch/repeat across the entire screen regardless of the person's resolution. How does one do that?
Fudge is offline
Reply With Quote
View Public Profile
 
Old 09-26-2009, 06:56 AM Re: You know those backgrounds that start out fixed but turn into something repetitiv
StylaStyla's Avatar
Mad Man

Posts: 401
Name: Styla
Location: City of London
Trades: 0
Quote:
Originally Posted by Fudge View Post
Success. With some tweaking, I got it to work. The next step is making it repeat horizontally. I want to post a simple gradient like a sky and have that stretch/repeat across the entire screen regardless of the person's resolution. How does one do that?

You would need to apply that to the body so
Code:
body {
background:#000;
background-image:url(earth.jpg) center top no-repeat;
}
The red line.. this is your key.

Design whatever you want in your GFX program - if it is a simple top to bottom gradient then slice it at whatever height you want and make sure the width is no bigger than 5px (for optimal loading).

save it, then upload it and link it in the CSS above (red line).

you need to delete the CENTER code since you want it to repeat all the way from the left to right and also delete the TOP code since it will be at the top by default.

Also change "no-repeat" to "repeat-x" since you want to to repeat on the X-axis.

now save the file and you shall see a repeating gradient going across.

You might see that the bottom of that gradient image clips and doesn't match the rest of the body.. so what you do is you change the colour of your background to the EXACT same colour of the gradient images' bottom using the colour picker in your GFX program you can find out the HEX code.


Currently, the background is set at BLACK so if your gradient from TOP-down ends in black then this is a seamless integration otherwise if your gradient goes top down (green-blue) then you need to set the background to blue.


For IMAGE repeats and not simple gradients - you will need more precision.

A cloud background repeat will require a few graphical adjustments such as the very left of the cloud image being pure blue and the very right being pure blue so that when you set it as REPEAT-X.. they will connect and repeat seamlessly on your Widescreen Sony HD LED TV
__________________
Freelance Graphic Designer not for hire

Last edited by StylaStyla; 09-26-2009 at 06:58 AM..
StylaStyla is offline
Reply With Quote
View Public Profile Visit StylaStyla's homepage!
 
Old 09-26-2009, 08:00 AM Re: You know those backgrounds that start out fixed but turn into something repetitiv
Average Talker

Posts: 25
Trades: 0
Got it working. Looks great now. Thanks for your help.

Last edited by Fudge; 09-26-2009 at 08:05 AM..
Fudge is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to You know those backgrounds that start out fixed but turn into something repetitive?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.85821 seconds with 12 queries