Styling background images...

3 views
Skip to first unread message

plattecoducks

unread,
Apr 24, 2009, 8:20:35 AM4/24/09
to phpShop
I'm having a problem with background image references in style sheets.
Below is a sample:

#content {
width:25%;
float:left;
background-image: url( /* path */ /background_image.png);
}

The problem is what to use for the path to the image. I've placed all
of the images in the /images/shop/vendor directory. I can produce the
background image using inline styling, but that defeats the purpose of
style sheets. I want that convenience and usability. I've tried
everything I can think of to no avail. Using phpshop 0.8 running under
XAMPP.

Any answers?

Jeff Newman

unread,
Apr 24, 2009, 1:06:40 PM4/24/09
to php...@googlegroups.com
it's based on the location of the CSS file itself, so it should be

background-image: url(../images/shop/vendor/filename.jpg);
--------------------------------------------------------------------------------



No virus found in this incoming message.
Checked by AVG - www.avg.com
Version: 8.0.238 / Virus Database: 270.12.4/2078 - Release Date: 04/24/09
07:54:00

plattecoducks

unread,
Apr 24, 2009, 3:10:34 PM4/24/09
to phpShop
Well, duh..., Dave. Why didn't I think of that. You'd think I'd never
done this before.

Thanks Jeff.
Reply all
Reply to author
Forward
0 new messages