View Full Version : css right left image issue
buxmike
06-03-2013, 11:57 PM
Having an issue creating images. Would like one on right and one on left, ( over the main background image ) however, no matter what I place in, only shows on right, left but never both?
I know I'm doing something wrong, just not sure what it is.
Wordpress css
body {
color:#cdc9c9;
font-size:12px;
font-family: 'arial';
position:relative;
background:url("images/back-body.jpg") top no-repeat;
background: url("images/bg-left.png") no-repeat;
background: url("images/bg-right.png") top right no-repeat;
text-shadow:1px 1px 1px #202020;
}
buxmike
06-03-2013, 11:59 PM
floating would also be great/ if possible so it moves with page when scrolled.
Thanks in advance.....
ajfmrf
06-04-2013, 01:27 AM
Please post a link to the page on your site that contains the problematic script so we can check it out.
It will make getting help a lot easier/faster
buxmike
06-04-2013, 01:41 AM
RE:
[QUOTE=ajfmrf;295663]Please post a link to the page on your site that contains the problematic script so we can check it out.
Sorry, I never know if they are allowed or not:
kentuckyweedradio.com
Beverleyh
06-04-2013, 05:11 AM
It looks like the syntax is incorrect - multiple background values should just be comma-separated.
background: url(sheep.png) center bottom no-repeat, url(betweengrassandsky.png) left top no-repeat;See http://www.css3.info/preview/multiple-backgrounds/
buxmike
06-04-2013, 12:56 PM
So would this be correct then?
body {
color:#cdc9c9;
font-size:12px;
font-family: 'arial';
position:relative;
background:url("images/back-body.jpg") top no-repeat,
background: url("images/bg-left.png") top left no-repeat,
background: url("images/bg-right.png") top right no-repeat;
text-shadow:1px 1px 1px #202020;
}
buxmike
06-04-2013, 01:04 PM
The above code , dose not show, right or left image?
Beverleyh
06-04-2013, 01:50 PM
So would this be correct then?
body {
color:#cdc9c9;
font-size:12px;
font-family: 'arial';
position:relative;
background:url("images/back-body.jpg") top no-repeat,
background: url("images/bg-left.png") top left no-repeat,
background: url("images/bg-right.png") top right no-repeat;
text-shadow:1px 1px 1px #202020;
}
No that's still not the correct syntax. Look carefully at the sample code I posted (from the linked resource) and you'll see that there is only one background property with multiple, comma-separated values listed after it. Here's that sample code again for reference;
background: url(sheep.png) center bottom no-repeat, url(betweengrassandsky.png) left top no-repeat;
buxmike
06-04-2013, 10:15 PM
worked! Thank you.
If I may ask, where can I add float to keep inframe.
Meaning when someone scrolls down the site, the two images
right / left don't move.
Thank you.
Beverleyh
06-04-2013, 10:35 PM
You just need to add the background-attachment value of "fixed" into your CSS shorthand. See here for reference: http://www.dustindiaz.com/css-shorthand/
buxmike
06-04-2013, 10:48 PM
Your Awesome !
Thank you.
buxmike
06-04-2013, 10:49 PM
Resolved.
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.