Go Back   Computer Forums > Web Design | Website Development > Web Programming
Click Here to Login
Join Computer forums Today


Reply
 
Thread Tools Search this Thread Display Modes
 
Old 06-02-2006, 08:01 AM   #11
Site Team
 
root's Avatar
 
Join Date: Mar 2004
Posts: 8,007
Default Re: strech not tile

Like I said earlier, just use multiple layers.

first setup a background layer, and set it so that it appears behind all the other objects.
put an image in it an set that image to be 100% of the page space (so it stretches for all resolutions)
then put the content in on top of that.
Code:
<style>
.bgimg {
width: 100%;
height: 100%;
}
.bg {
position: absolute;
top: 0px;
left: 0px;
width: 100%;
height: 100%;
z-index: -1;
}

</style>
<div class="bg">
	<img src="Image Source" class="bgimg">
</div>
 
<!-- place all your page content here -->
__________________

__________________
I didn’t fight my way to the top of the food chain to be a vegetarian…
Im sick of people saying 'dont waste paper'. If trees wanted to live, they'd all carry guns.
"The inherent vice of capitalism is the unequal sharing of blessings; The inherent vice of socialism is the equal sharing of miseries."
root is offline   Reply With Quote
Old 06-02-2006, 04:23 PM   #12
BSOD
 
King of Kings's Avatar
 
Join Date: Mar 2006
Posts: 1,072
Default Re: strech not tile

I took that, put in the image source, and nuthing shows up but the <!--place content here> what do I need to change
__________________

King of Kings is offline   Reply With Quote
Old 06-03-2006, 05:41 PM   #13
Site Team
 
root's Avatar
 
Join Date: Mar 2004
Posts: 8,007
Default Re: strech not tile

No, I think you misunderstand... that's an example.

put the part that says
Code:
<style>
.bgimg {
width: 100%;
height: 100%;
}
.bg {
position: absolute;
top: 0px;
left: 0px;
width: 100%;
height: 100%;
z-index: -1;
}

</style>
<div class="bg">
	<img src="Image Source" class="bgimg">
</div>
in the top of your document
change the line
Code:
<img src="Image Source" class="bgimg">
to look at the right image file from your site that you want as the background.
Code:
<img src="http://www.mydomain.com/myimages/mybackground.jpg" class="bgimg">
ignore the part that says
Code:
<!-- place all your page content here -->
or do as it suggest and place the contents of your page there.
__________________
I didn’t fight my way to the top of the food chain to be a vegetarian…
Im sick of people saying 'dont waste paper'. If trees wanted to live, they'd all carry guns.
"The inherent vice of capitalism is the unequal sharing of blessings; The inherent vice of socialism is the equal sharing of miseries."
root is offline   Reply With Quote
Old 06-03-2006, 07:45 PM   #14
BSOD
 
King of Kings's Avatar
 
Join Date: Mar 2006
Posts: 1,072
Default Re: strech not tile

nah thats how I did it,nothing
King of Kings is offline   Reply With Quote
Old 06-04-2006, 06:30 AM   #15
Site Team
 
root's Avatar
 
Join Date: Mar 2004
Posts: 8,007
Default Re: strech not tile

Any chance that you coud provide a link so we can see the code that you are using?
__________________
I didn’t fight my way to the top of the food chain to be a vegetarian…
Im sick of people saying 'dont waste paper'. If trees wanted to live, they'd all carry guns.
"The inherent vice of capitalism is the unequal sharing of blessings; The inherent vice of socialism is the equal sharing of miseries."
root is offline   Reply With Quote
Old 06-04-2006, 07:11 AM   #16
BSOD
 
King of Kings's Avatar
 
Join Date: Mar 2006
Posts: 1,072
Default Re: strech not tile

Code:
<style>
.bgimg {
width: 100%;
height: 100%;
}
.bg {
position: absolute;
top: 0px;
left: 0px;
width: 100%;
height: 100%;
z-index: -1;
}

</style>
<div class="bg">
	<img src="The pic im tryin to use as a background" class="bgimg">
</div>
King of Kings is offline   Reply With Quote
Old 06-05-2006, 11:22 PM   #17
Baseband Member
 
itturnstoashes's Avatar
 
Join Date: May 2006
Posts: 39
Send a message via MSN to itturnstoashes
Default Re: strech not tile

Um, i'm PRETTY sure the reason that's not working, is because your not putting your "style" tag in the "Head" section of your page.
When your dealing with clean html, this is a must usually. here's what i got.
Code:
<html>
<head>
<title>None</title>
<style>
.bgimg {
width: 100%;
height: 100%;
}
.bg {
position: absolute;
top: 0px;
left: 0px;
width: 100%;
height: 100%;
z-index: -1;
}

</style>
</head>

<body>

<div class="bg">
	<img src="The pic im tryin to use as a background" class="bgimg">
</div>
</body>
</html>
Voila. Worked for me.
__________________

itturnstoashes is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off



All times are GMT -5. The time now is 03:50 PM.


Powered by vBulletin® Version 3.8.8 Beta 4
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Search Engine Friendly URLs by vBSEO 3.6.0