Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 07-15-2012, 09:59 AM   PM User | #1
justintime
New Coder

 
Join Date: Jun 2012
Location: Burton on Trent, England
Posts: 26
Thanks: 6
Thanked 0 Times in 0 Posts
justintime is an unknown quantity at this point
Background stretch help please

I would like to create a background which a portion of would stretch as content is added.
IE. The pic below. White line and above to remain fixed and the faded section below white line to stretch with content.
Is this possible and if so, could you tell me how, thank you.

justintime is offline   Reply With Quote
Old 07-15-2012, 02:47 PM   PM User | #2
tempz
Regular Coder

 
Join Date: Jul 2012
Location: London
Posts: 436
Thanks: 4
Thanked 80 Times in 80 Posts
tempz is an unknown quantity at this point
Code:
body {
       background: url('mybackground.png') repeat-x;

or 

body {
       background: url('mybackground.png');
       background-repeat:repeat-x;
Code:
vertical = "y"
horizontal = "x"
Have fun!
tempz is offline   Reply With Quote
Old 07-15-2012, 06:25 PM   PM User | #3
justintime
New Coder

 
Join Date: Jun 2012
Location: Burton on Trent, England
Posts: 26
Thanks: 6
Thanked 0 Times in 0 Posts
justintime is an unknown quantity at this point
Thanks tempz.

Unfortunately that repeats the whole thing over and over. I was trying to keep the top portion static and stretch the bottom section only.
justintime is offline   Reply With Quote
Old 07-15-2012, 06:38 PM   PM User | #4
DrDOS
Senior Coder

 
Join Date: Sep 2010
Posts: 1,155
Thanks: 10
Thanked 148 Times in 148 Posts
DrDOS is infamous around these parts
Google this, 'background stretching css', it provides all the information there is on the subject. The only other way that I can think of would be to use an .svg file as the backrgound an use javascript to adjust it.
DrDOS is offline   Reply With Quote
Old 07-15-2012, 07:08 PM   PM User | #5
quiatimet
New to the CF scene

 
Join Date: Jul 2012
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
quiatimet is an unknown quantity at this point
Background image won't stretch to be full screen =S HTML & CSS. You told me what to do. Please help me coding forums.
quiatimet is offline   Reply With Quote
Old 07-15-2012, 07:23 PM   PM User | #6
tempz
Regular Coder

 
Join Date: Jul 2012
Location: London
Posts: 436
Thanks: 4
Thanked 80 Times in 80 Posts
tempz is an unknown quantity at this point
Quote:
Originally Posted by justintime View Post
Thanks tempz.

Unfortunately that repeats the whole thing over and over. I was trying to keep the top portion static and stretch the bottom section only.
My bad, he said "How can I make this stretch to fill background" I just thought...

Sorry for adding to the confusion!
tempz is offline   Reply With Quote
Old 07-15-2012, 08:27 PM   PM User | #7
justintime
New Coder

 
Join Date: Jun 2012
Location: Burton on Trent, England
Posts: 26
Thanks: 6
Thanked 0 Times in 0 Posts
justintime is an unknown quantity at this point
I am confused now

This is what I am trying to acheive as a web page background:
justintime is offline   Reply With Quote
Old 07-16-2012, 01:39 AM   PM User | #8
tempz
Regular Coder

 
Join Date: Jul 2012
Location: London
Posts: 436
Thanks: 4
Thanked 80 Times in 80 Posts
tempz is an unknown quantity at this point
Do you mean this?

tempz is offline   Reply With Quote
Old 07-16-2012, 07:55 AM   PM User | #9
justintime
New Coder

 
Join Date: Jun 2012
Location: Burton on Trent, England
Posts: 26
Thanks: 6
Thanked 0 Times in 0 Posts
justintime is an unknown quantity at this point
Quote:
Originally Posted by tempz View Post
Do you mean this?

Yes tempz, thats what I mean. I have googled it but had no luck understanding it.
justintime is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

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

Forum Jump


All times are GMT +1. The time now is 03:24 PM.


Advertisement
Log in to turn off these ads.