Page is a not externally linkable
- Code, Content, and Presentation
-- CSS
---- Load a image from a CSS (not background image)


DJZman - 7:31 am on Sep 27, 2011 (gmt 0)


I am making a website that will reuse lots of images on diffent pages.

what i would like to do is hold all the image urls in a CSS

Then when i want to use the image in the PHP file i can call it up

Any idea how to do this with out using a background statment


Like: (i know this code will not work)
Images.css file would have it in something like this.

.image1
{
image:url(logo1.gif)
}
.image2
{
image:url(photo1.gif)
}
--------------------------------------

then in the PHP file have it it pull up the photo when i want it
<html>
<head>
<link href="/css/images.css" rel="stylesheet" type="text/css" />
</head>
<body>
<center><h1> Hello welcome to</h1>
<span class="image1" width 100% height 100%><BR><BR><BR>
Here is a photo from yesterdays storm<BR>
<span class="image2" width 100% height 100%>
</body>
</html>

-----------------------------------------------------

I know this code looks lame, but im only doing it as a sample so you can see what im trying to do. so you dont get confused and think i want a background-image

Thanks for any help.



--------------------------------------------------------


Thread source:: http://www.webmasterworld.com/css/4367661.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com