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
How to stretch an image with css using the body tag
Old 10-08-2007, 07:44 PM How to stretch an image with css using the body tag
Junior Talker

Posts: 1
Trades: 0
Hi all,

I'm trying to stretch an image with CSS using the body tag.

Here is the CSS code:

/*Background repeat on body*/
body {
background-repeat:repeat-x;
background:url(../images/blue_background.jpg);
background-color:#FFFFFF;
margin-top: 0px;
margin-bottom: auto;

blue_background.jpg is 10px in height and 3000px in width

I applied a white background so it won't repeat in the y-axis, but it repeated in both firefox and IE
doraima29 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 10-08-2007, 08:08 PM Re: How to stretch an image with css using the body tag
vangogh's Avatar
Post Impressionist

Latest Blog Post:
Why Responsive Design?
Posts: 10,815
Name: Steven Bradley
Location: Boulder, Colorado
Trades: 0
Try

background:url(../images/blue_background.jpg) repeat-x;

and drop the background-color:#FFFFFF
__________________
l Search Engine Friendly Web Design |
Please login or register to view this content. Registration is FREE

l Tips On Marketing, SEO, Design, and Development |
Please login or register to view this content. Registration is FREE

l
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
vangogh is offline
Reply With Quote
View Public Profile Visit vangogh's homepage!
 
Old 10-09-2007, 05:10 AM Re: How to stretch an image with css using the body tag
maxxximus's Avatar
Extreme Talker

Posts: 219
Name: Rob
Location: UK
Trades: 0
First you've got an image 3000px wide WTF

If it is 3000px wide and 10px high then it needs to be repeated down the y-axis ie vertical to fill the screen.

If its a typo and just 300px wide then it will tile x and y with just background:url(../images/blue_background.jpg);
maxxximus is offline
Reply With Quote
View Public Profile
 
Old 10-09-2007, 06:25 PM Re: How to stretch an image with css using the body tag
vangogh's Avatar
Post Impressionist

Latest Blog Post:
Why Responsive Design?
Posts: 10,815
Name: Steven Bradley
Location: Boulder, Colorado
Trades: 0
Good catch Rob. I didn't notice how wide it was.
__________________
l Search Engine Friendly Web Design |
Please login or register to view this content. Registration is FREE

l Tips On Marketing, SEO, Design, and Development |
Please login or register to view this content. Registration is FREE

l
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
vangogh is offline
Reply With Quote
View Public Profile Visit vangogh's homepage!
 
Reply     « Reply to How to stretch an image with css using the body tag
 

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.40539 seconds with 12 queries