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
Ok what is the proper way with 2 background images on the body?
Old 09-29-2010, 09:52 AM Ok what is the proper way with 2 background images on the body?
heat33's Avatar
Skilled Talker

Posts: 82
Name: Don
Trades: 0
OK,
I have been just making the picture extra wide and sticking the 2 pics I wanted to show on the background on the end of the wide graphic which wirks.
But what CSS would pit pic1 on the top left and pic2 on the top right.
heat33 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 09-30-2010, 03:36 AM Re: Ok what is the proper way with 2 background images on the body?
CSM
CSM's Avatar
Front-End Developer

Posts: 297
Name: Michael Pehl
Location: Palma de Mallorca
Trades: 0
I do not know about the dimensions of your pictures... and your CSS/HTML code.

Do you want those pics always top left and top right?

Then you can use it like this:

Code:
CSS

.pic1 {
position:absolute;
width:xxxpx;
height:yyypx;
background-image: url('/path/to/your/pic1.jpg');
background-repeat: no-repeat;
top:0;
left:0;
}

.pic2 {
position:absolute;
width:xxxpx;
height:yyypx;
background-image: url('/path/to/your/pic2.jpg');
background-repeat: no-repeat;
top:0;
right:0;
}
Something like this... just give your img tag the class pic1/pic2...

If you have this stuff online give us the link, or just paste your CSS/HTML here
__________________
Chief Web Officer / Front-End Developer / System Engineer

Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE
CSM is offline
Reply With Quote
View Public Profile Visit CSM's homepage!
 
Old 09-30-2010, 10:38 PM Re: Ok what is the proper way with 2 background images on the body?
LadynRed's Avatar
Defies a Status

Posts: 10,017
Location: Tennessee
Trades: 0
That won't work very well if you want those images to be BACKGROUND images.
Definitely need to see a URL or ALL of your code so far.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 10-04-2010, 03:29 PM Re: Ok what is the proper way with 2 background images on the body?
Novice Talker

Posts: 6
Name: Jibin Padmanabhan
Trades: 0
Quote:
Originally Posted by heat33 View Post
OK,
I have been just making the picture extra wide and sticking the 2 pics I wanted to show on the background on the end of the wide graphic which wirks.
But what CSS would pit pic1 on the top left and pic2 on the top right.
html 5 is the possible solution
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
jibin is offline
Reply With Quote
View Public Profile Visit jibin's homepage!
 
Old 10-04-2010, 04:35 PM Re: Ok what is the proper way with 2 background images on the body?
Crimson's Avatar
Skilled Talker

Posts: 56
Name: Connor
Location: United States
Trades: 0
You could try something like this. If your current BODY code looks like:

Code:
<body>
    ...lots of code and content here...
</body>
Add a DIV tag around everything:

Code:
<body>
    <div id="background2">
        ...lots of code and content here...
    </div>
</body>
And then in your CSS:

Code:
body {
    background: url(first-background.jpg) no-repeat top left;
    }

#background2 {
    background: url(second-background.jpg) no-repeat top right;
    }
(You may also need to adjust the margins a bit)
__________________

Please login or register to view this content. Registration is FREE

I solve code problems, browser compatibility (including IE 6), Wordpress trouble, the works.

Last edited by Crimson; 10-04-2010 at 04:37 PM..
Crimson is offline
Reply With Quote
View Public Profile Visit Crimson's homepage!
 
Old 10-06-2010, 07:42 AM Re: Ok what is the proper way with 2 background images on the body?
atulvhale's Avatar
Novice Talker

Posts: 12
Name: Atul Vhale
Location: India/Mumbai
Trades: 0
Define property as

Code:
#backgroundimg1{
	background-image: url(../pix/logo_quirksmode.gif), url(../pix/logo_quirksmode_inverted.gif);
	background-repeat: repeat-y;
	background-position: top left, top right;
	width: 385px;
	height: 100px;
	border: 1px solid #000000;
}

Last edited by atulvhale; 10-06-2010 at 07:45 AM..
atulvhale is offline
Reply With Quote
View Public Profile Visit atulvhale's homepage!
 
Old 10-08-2010, 09:21 AM Re: Ok what is the proper way with 2 background images on the body?
LadynRed's Avatar
Defies a Status

Posts: 10,017
Location: Tennessee
Trades: 0
Yes, you can do it with CSS3 - but it's not fully supported in today's browsers. So, you would be better off to take another approach to the problem.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Ok what is the proper way with 2 background images on the body?
 

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