Re: CSS with WOComponent
Re: CSS with WOComponent
- Subject: Re: CSS with WOComponent
- From: Chuck Hill <email@hidden>
- Date: Sat, 30 Oct 2004 09:54:26 -0700
You can't use relative paths with WO dynamic pages. What full path does
"../Styles.css" get translated into? Where is the file actually at? Think
about it. "../Styles.css" means, take the last two components off of the
location shown in the browser and replace with /Styles.css. I think you
will find that the resulting path does not exist on your machine.
What to do? Use domain relative paths. For example.
<link rel="stylesheet" type="text/css" href="/CSS/Styles.css">
Another option that some like is to vend the CSS from the application via a
direct action. Still another alternative is to include it as a resource in
your application and get WOResourceManager to form URLs to it.
This was recently discussed here, take a look in the archives.
Chuck
At 01:55 PM 30/10/2004 +0200, Wolfram Stebel wrote:
>Hi all,
>
>Is there an easy way to use css in components?
>Selfhtml means to include a <link> in the <HEAD> section as below is
>correct, where the href="../Styles.css" is a path relativ to the html-file
>of the component.
>
>Example: Main.wo, File Main.html contains:
>
>...
><HEAD>
> <Title>Styletest</Title>
> <link rel="stylesheet" type="text/css" href="../Styles.css">
></HEAD>
>...
>
>A SELECT-browser inside the component uses the format:
>
><select class="SelectFormat" size="5"></select>
>
>
>
>This is the content of the "../Styles.css" file:
>
><style type="text/css">
> .SelectFormat
> { width:100%; }
></style>
>
>
>Seems to be simple, but does not work with IE and safari, probably also not
>with others.
>
>The following style definition in the <HEAD> section works as expected:
>
><style type="text/css">
>.SelectFormat
>{ width:100%; }
></style>
>
>
>Any suggestions?
>Thanks!
>
>
>Wolfram Stebel
>Flutgrabenstr. 19, 35576 Wetzlar
>Tel. 06441/48164, Mobil: 0172/6558588
>Mailto: email@hidden
>
>
> _______________________________________________
>Do not post admin requests to the list. They will be ignored.
>Webobjects-dev mailing list (email@hidden)
>Help/Unsubscribe/Update your Subscription:
e.net
>
>This email sent to email@hidden
>
--
Chuck Hill email@hidden
Global Village Consulting Inc. http://www.global-village.net
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden