struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hookom, Jacob" <Jacob.Hoo...@redline.mckhboc.com>
Subject RE: [OT] RE: Rendering Images
Date Tue, 15 Jun 2004 22:22:26 GMT
Render Time - Missing Images

<div id="prdNoImg">
	<div id="prdImg"></div>
</div>

#prdNoImg {
 width: 300px; height: 75px;
 background-image: url(img/bg.gif);
 background-repeat: no-repeat;
}
#prdImg {
 width: 300px; height: 75px;
 background-image: url(img/b_search.gif);
 background-repeat: no-repeat;
}

You would define the #prdImg's background image at server time through jstl
or a scriplet(*boo*).  So it would be:

background-image: url(<c:out value="${imgSrc}"/>);

This works because if the background image of #prdImg is not found, the
browser just won't render anything, whereas it would normally render a
broken image icon.  If the image is found, then it will show up over top of
#prdNoImg's.

You would want to play around with the dimensions too.  If you would have
any other CSS questions, look at www.w3schools.com

Jacob Hookom
Senior Analyst/Programmer
McKesson Medical-Surgical, Minnesota
------------------------------------
"don't buy a dog and bark yourself"


-----Original Message-----
From: Wendy Smoak [mailto:Wendy.Smoak@asu.edu] 
Sent: Tuesday, June 15, 2004 5:14 PM
To: Struts Users Mailing List
Subject: RE: [OT] RE: Rendering Images

> From: Hookom, Jacob [mailto:Jacob.Hookom@redline.mckhboc.com] 
> Actually, I think you can do this pretty easily with CSS...

Here's a thread that might be helpful...
http://www.webmasterworld.com/forum91/1871.htm

-- 
Wendy Smoak

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message