Re: CSS background graphics
Re: CSS background graphics
- Subject: Re: CSS background graphics
- From: Chuck Hill <email@hidden>
- Date: Tue, 30 Dec 2003 19:28:50 -0800
Drew,
You are sort of misusing WO. From an optimization point of view you should
avoid running static resource requests through the application. The
"wr?wodata" part of the URL below shows that you are using the application
and WOResourceManager to vend the images. In addition to some quirks,
WOResourceManager is also a lot slower than, say, Apache at this sort of
thing. The reason that it only works when you display the image elsewhere
on the page is that WOResourceManager only makes it available when it knows
that it needs to. WOResourceManager knows nothing about your external CSS
file.
What I would do is to put quaq_r3_c1.gif under the DocuemntRoot of your
webserver, let's say under /images/ and then use CSS like this:
background-image: url("/images/quaq_r3_c1.gif");
You can also make the image part of the Webserver Resources of your
project, do a split install, and reference it like
background-image:
url("/WebObjects/WOTestApp.woa/Contents/WebServerResources/quaq_r3_c1.gif");
In general, CSS is not a WO specific technology and it is most efficient to
keep the two separated.
Chuck
At 10:01 PM 30/12/2003 -0500, Drew Thoeni wrote:
>I'm using a linked style sheet in my WO application and images
>referenced using the CSS format below only show if the image is also
>being displayed elsewhere on the page using, for example, a WOImage
>(and this oddity took a while to figure out).
>
>Has anyone successfully displayed images in backgrounds (of tables or
>DIVs) from linked CSS URLs?
>
>Regards,
>
>Drew
>
>
>background-image:
>url("/cgi-bin/WebObjects/WO-quaq.woa/wr?
>wodata=file:/Users/drewt/Documents/WOTestApp/webServerResour
>ces/quaq_r3_c1.gif");
>_______________________________________________
>webobjects-dev mailing list | email@hidden
>Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/webobjects-dev
>Do not post admin requests to the list. They will be ignored.
>
--
Chuck Hill email@hidden
Global Village Consulting Inc. http://www.global-village.net
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.