Current location: Hot Scripts Forums » General Web Coding » CSS » Two Background Images


Two Background Images

Reply
  #1 (permalink)  
Old 01-28-10, 10:04 PM
creepycridler's Avatar
creepycridler creepycridler is offline
Wannabe Coder
 
Join Date: Feb 2005
Location: Seatac, WA
Posts: 120
Thanks: 0
Thanked 0 Times in 0 Posts
Two Background Images

Hello,

I am trying to stack images in the background of my site. I have one image that I would like to repeat-x for one row the start another image and do the same but continue on until there is no space left on screen. Does that make sense?

Here is what I have but it is not working.

HTML Code:
body {
	margin: 0px;
	padding: 0px;
	background-image:url('../images/default_body_bg.gif');
	background-repeat:repeat-x;
	background-image:url('../images/default_body_bg.gif');
	
}
Thanks in advance!
__________________
PCSI Design Inc.
Reply With Quote
  #2 (permalink)  
Old 01-28-10, 10:29 PM
creepycridler's Avatar
creepycridler creepycridler is offline
Wannabe Coder
 
Join Date: Feb 2005
Location: Seatac, WA
Posts: 120
Thanks: 0
Thanked 0 Times in 0 Posts
I also tried this thinking that the image I want on the bottom would repeat the whole screen and the top would overlay once and leave the background visible....

HTML Code:
html {
	background-image:url('../images/body_bg.gif');
}


body {
	margin: 0px;
	padding: 0px;
	background-image:url('../images/default_body_bg.gif') repeat-x;
}
__________________
PCSI Design Inc.
Reply With Quote
  #3 (permalink)  
Old 01-28-10, 11:12 PM
wirehopper's Avatar
wirehopper wirehopper is offline
-
 
Join Date: Feb 2006
Posts: 2,515
Thanks: 20
Thanked 109 Times in 106 Posts
HTML Code:
...
<style type="text/css">
body
{
margin:0;
padding:0;
}
#top
{
width:100%;
height:250px; /* Height of image */
background:transparent url(../image/bg.gif) repeat-x;
}
#next
{
width:100%;
height:500px;
background:transparent url(../image/bg2.gif);
}
</style>
<body>
<div id="top">
Top content
</div>
<div id="next">
Next content
</div>
...
Not tested.

Visit W3Schools Online Web Tutorials for help
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Background images of print.css doesnt show? bassa CSS 1 11-18-08 10:28 AM
2 divs, one top one bottom, problem with background images Mythvn CSS 2 04-28-08 06:27 PM
Converting to ems spyke01 CSS 0 11-09-07 02:48 PM
DIV background (top & bottom images) overlapping? sp1ky CSS 1 11-12-06 10:53 AM
Background images in tables - help!! benholmes12345 HTML/XHTML/XML 1 02-20-06 09:03 AM


All times are GMT -5. The time now is 02:28 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.