Old 02-02-2008   #1 (permalink)
Registered User
 
Join Date: Oct 2007
Posts: 43

Send a message via MSN to Neo824
CSS Background Help Needed

Hello, I'm having a bit of trouble with my background image in CSS. There is this one image that I would like to use as a background image, it is a gradient with stripes. I am having issues with doing so because I can not get the image to take up the entire page. Below is the image that I am trying to work with, the HTML file, and the CSS file.

Image:


HTML File:
Code:
<html>

<!-- Head -->
<head>
<!-- Title -->
<title>Neo Productions [HomePage]</title>
<!-- Stylesheet Link -->
<link rel="stylesheet" type="text/css" href="stylesheet.css">
</head>

<!-- Body -->
<body>

</body>

</html>
CSS File:
Code:
/* Neo Productions [StyleSheet] */

/* Basic Styles */
body {
background: url('images/bg.png') repeat-x;
}
Any help will be greatly appreciated!

Thanks,
Neo
Neo824 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 02-02-2008   #2 (permalink)
Janitor of Lunacy
 
tamlin's Avatar
 
Join Date: May 2006
Location: Sitting in the Wishing Chair
Posts: 4,824

Not quite sure what you mean. repeat-x will repeat the image horizontally, but if the image is shorter than the page, you'll get a gap below the image. repeat will repeat the image both horizontally and vertically, but if your image is not tileable, you'll get an obvious join.

CSS Background-repeat Property

Sorry if I've misunderstood your question.
__________________


Religion: It's all fun and games until someone gets burned at the stake...
tamlin is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 02-02-2008   #3 (permalink)
Registered User
 
Join Date: Oct 2007
Posts: 43

Send a message via MSN to Neo824
Quote:
Originally Posted by tamlin View Post
Not quite sure what you mean. repeat-x will repeat the image horizontally, but if the image is shorter than the page, you'll get a gap below the image. repeat will repeat the image both horizontally and vertically, but if your image is not tileable, you'll get an obvious join.

CSS Background-repeat Property

Sorry if I've misunderstood your question.
I think you misunderstand me, I want the image to stretch to take up the ENTIRE page. Regardless of the user's resolution. Do you have MSN? Maybe we could talk about it over it, my screename is Neo-824@hotmail.com
Neo824 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 02-02-2008   #4 (permalink)
Janitor of Lunacy
 
tamlin's Avatar
 
Join Date: May 2006
Location: Sitting in the Wishing Chair
Posts: 4,824

I'm not an expert in CSS, but I don't think there's a pure CSS way to "stretch" a background image. Apparently, there is a "background-size" property in CSS3, but this is not currently supported in any browsers.

However, this link is to a fudge that seems to work:
FAQ - stretching a background image
__________________


Religion: It's all fun and games until someone gets burned at the stake...
tamlin is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 02-02-2008   #5 (permalink)
Registered User
 
Join Date: Oct 2007
Posts: 43

Send a message via MSN to Neo824
Quote:
Originally Posted by tamlin View Post
I'm not an expert in CSS, but I don't think there's a pure CSS way to "stretch" a background image. Apparently, there is a "background-size" property in CSS3, but this is not currently supported in any browsers.

However, this link is to a fudge that seems to work:
FAQ - stretching a background image
Do you have any idea how I could make this image tilable?
Neo824 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 02-02-2008   #6 (permalink)
Janitor of Lunacy
 
tamlin's Avatar
 
Join Date: May 2006
Location: Sitting in the Wishing Chair
Posts: 4,824

Quote:
Originally Posted by Neo824 View Post
Do you have any idea how I could make this image tilable?
You're not going to be able to make any image with a gradient tileable. There are two tutorials on making seamless textures in the Tutorials section that might give you some ideas, however:

BioRUST.com :: Tutorials >> Seamless Textures
BioRUST.com :: Tutorials >> Advanced Seamless Textures
__________________


Religion: It's all fun and games until someone gets burned at the stake...
tamlin is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 02-03-2008   #7 (permalink)
photoshop ninja
 
agentxi's Avatar
 
Join Date: Oct 2006
Location: Red Deer - ish, alberta
Posts: 512

yeah the gradient part is hard, but if you can make your stripes "tileable" then you can create an "overlay" effect for the gradient, and have 2 wrapper div's the outside div would have the stripes while the inside one would have the gradient overlay...

then i would make it partially transparent so that it does the "overlay" effect. try and avoid using png's for the gradient if you can, as this will mess up in ie6, although there are some hacks and javascripting that can help with forcing ie6 to see the png transparency's.

I've never actually tried this, but this is where i'd start to make it happen.

try a gif for the gradient and see what kind of quality you can make it have if not, then look into the complex world of making ie6 work with png transparency's
__________________

Your a Graphic Designer...If you could go back in time you wouldn't go back to see the rise and fall of civilizations, you'd go back in time to destroy comic sans and papyrus.
agentxi is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 02-04-2008   #8 (permalink)
Be Unique. Be Heard.
 
Jacorre's Avatar
 
Join Date: Jul 2006
Location: USA
Posts: 476

Take a look at my tutorial about repeating backgrounds with CSS. Doing a seamless gradient tiled background will be tough.
__________________

Jacorre Studios Blog
Jacorre is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
fantastick background :))) fatih Adobe Photoshop 16 05-07-2007 02:33 AM
I need someone to make me a background xcjzerox The Marketplace 1 02-10-2007 01:23 AM
Remove the background paulopires Adobe Photoshop 14 12-12-2006 10:21 AM
Background ::Word:: Showrooms & Works In Progress 3 03-06-2006 11:09 PM
I need help on HTMl background. ParaSnake HTML / PHP / ASP / JS 9 12-21-2005 12:30 AM


All times are GMT +1. The time now is 01:27 AM.
Content Relevant URLs by vBSEO 3.2.0

Design & Content © BioRUST 2007 :: PRIVACY STATEMENT :: LEGAL INFORMATION :: ADVERTISING MEDIA KIT