There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
 
Tag Cloud
acer black screen blue screen blue screen of death boot bsod computer connection crash css dell display driver drivers email error explorer firefox firefox 3 hard drive internet internet explorer itunes laptop lcd malware monitor network networking outlook outlook 2003 outlook express printer problem problems ram router security slow software sound sprtcmd.exe trojan usb video virus vista windows windows xp wireless
Web Design & Development
Search
Search in:
 
Advanced Search
Tech Support Guy Forums > Internet & Networking > Web Design & Development >
how can i have 2 background images??


HELLO AND WELCOME! Before you can post your question, you'll have to register -- it's completely free! Click here to join today! We highly recommend that you print a copy of our Guide for New Members. Enjoy!

Closed Thread
 
Thread Tools
firestormer's Avatar
Computer Specs
Senior Member with 1,353 posts.
 
Join Date: Sep 2005
Location: UK
Experience: Skilled: Know all i know and little else
03-Nov-2007, 02:56 PM #1
how can i have 2 background images??
How can i place two images, left.png and right.png as background images in a html web page?

i want left.png to be portioned top left and repeat vertically and right.png to be positioned top right and repeated vertically.

now i can use the following code in the <head> to place one of the images:

Code:
<style type="text/css">
  body {
  background-image: url("backgrnd/left.png");
  background-position: top left;
  background-repeat: repeat-y;
}
</style>
how can i place 2?
__________________
You say deviant like its a bad thing...

TSG has made me snow blind.
biagrin's Avatar
Computer Specs
Senior Member with 132 posts.
 
Join Date: Jan 2006
Location: uk
Experience: Pro-am
03-Nov-2007, 03:07 PM #2
if your site is a fixed width then you could just use an art program to make the 2 images into 1 and then repeat them in the code.

if its fluid then i have no idea how to do it, sorry
firestormer's Avatar
Computer Specs
Senior Member with 1,353 posts.
 
Join Date: Sep 2005
Location: UK
Experience: Skilled: Know all i know and little else
03-Nov-2007, 04:19 PM #3
Well i would prefer not to make it fixed width as these days there are a lot of different sized monitors.
MMJ's Avatar
MMJ MMJ is offline
Distinguished Member with 3,250 posts.
 
Join Date: Oct 2006
04-Nov-2007, 06:33 AM #4
There might be a way to do it, not too sure but what you can do is split the body in half than give each one a bg image.
Fyzbo's Avatar
Senior Member with 1,777 posts.
 
Join Date: Feb 2002
Location: North Carolina, USA
Experience: Programming-Advanced|EVER
05-Nov-2007, 08:35 AM #5
You can have one background image on the body tag and the other on the html.

body {
background-image: url("backgrnd/left.png");
background-position: top left;
background-repeat: repeat-y;
}
html {
background-image: url("backgrnd/right.png");
background-position: top right;
background-repeat: repeat-y;
}
froggyb's Avatar
Computer Specs
Junior Member with 5 posts.
 
Join Date: Nov 2007
Experience: Intermediate
25-Nov-2007, 08:30 PM #6
Hi there,

Similar to what Fyzbo said, you can put a background for an element layered one on top of another using the <div> element. Same as above but use e.g. div.bgimg{width:100%; height:100%;} into your div css to resize them accordingly. Then stick a <div> tag between your <body> tags. Hurrah!

This also works for rounded corners where you can have four nested divs, one for each corner.

Hope this helps!

Chris
firestormer's Avatar
Computer Specs
Senior Member with 1,353 posts.
 
Join Date: Sep 2005
Location: UK
Experience: Skilled: Know all i know and little else
26-Nov-2007, 03:16 AM #7
great thanks for all the help
Closed Thread

THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who help people like you solve computer problems. See our Welcome Guide to get started.



Thread Tools


You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 01:10 AM.
Copyright © 1996 - 2008 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Powered by Cermak Technologies, Inc.