Re: CSS background graphics
Re: CSS background graphics
- Subject: Re: CSS background graphics
- From: Drew Thoeni <email@hidden>
- Date: Tue, 30 Dec 2003 23:41:23 -0500
This makes great sense. This is my first app in WO and I have not yet
made it to the deployment stage. It seemed to me that putting the
images in the web server and letting that handle the CSS calls was the
right thing to do. But, oddly, I can't determine the web server
directory (and hence the URL) that WO uses in development.
I'm developing on a PowerBook and my web services is actually off
(Apache is not running). However, WO will serve up pages to the
localhost. So, I was figuring that there must be a way to serve these
images from WO's built-in web server and also make sure my image files
are in the right place to make it easy for later deployment.
Can you suggest a reference for how I should have set up my dev
environment?
Drew
PS. I really appreciate your help, and the help others on the list are
giving. I know it can be eye-rolling frustrating when some of these
questions come across. But, I really feel like I've made a lot of
progress in the past month or so.
On Dec 30, 2003, at 10:28 PM, Chuck Hill wrote:
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/webServerReso
ur
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.