You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Adriano dos Santos Fernandes <ad...@uol.com.br> on 2008/12/14 03:32:16 UTC

CSS urls

Hi!

What is the better way to handle CSS urls [background: url(...)], inside 
HTML <style> tags?

As I see, <wicket:link> doesn't work, so I'm writing url(style.css) and 
putting style.css on the normal html directory. Obviously, this don't 
work if I mount pages with path different than "/".


Adriano


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: CSS urls

Posted by Igor Vaynberg <ig...@gmail.com>.
in css image urls are relative to the css file. so if your css file is
in a java package and your images are nearby it should all work as
long as you serve css file through wicket - which will then cause all
your images to also be served through wicket.

-igor

On Tue, Dec 16, 2008 at 3:48 AM, Adriano dos Santos Fernandes
<ad...@uol.com.br> wrote:
> Knowing about HeaderContributor.forCss, I didn't realized that the images
> urls would be correctly resolved.
>
> Thanks.
>
> Wicket is so cool. :-)
>
>
> Adriano
>
>
> Martijn Dashorst escreveu:
>>
>> See HeaderContributor.forCss()
>>
>> Martijn
>>
>> On Tue, Dec 16, 2008 at 10:51 AM, Adriano dos Santos Fernandes
>> <ad...@uol.com.br> wrote:
>>
>>>
>>> No good/better way? The problem of using the web directory is that I
>>> can't
>>> do that with non-web utility projects in Eclipse and have the files being
>>> contributed to web projects.
>>>
>>>
>>> Adriano
>>>
>>>
>>> Adriano dos Santos Fernandes escreveu:
>>>
>>>>
>>>> Hi!
>>>>
>>>> What is the better way to handle CSS urls [background: url(...)], inside
>>>> HTML <style> tags?
>>>>
>>>> As I see, <wicket:link> doesn't work, so I'm writing url(style.css) and
>>>> putting style.css on the normal html directory. Obviously, this don't
>>>> work
>>>> if I mount pages with path different than "/".
>>>>
>>>>
>>>> Adriano
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>
>>>
>>>
>>
>>
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: CSS urls

Posted by Adriano dos Santos Fernandes <ad...@uol.com.br>.
Knowing about HeaderContributor.forCss, I didn't realized that the 
images urls would be correctly resolved.

Thanks.

Wicket is so cool. :-)


Adriano


Martijn Dashorst escreveu:
> See HeaderContributor.forCss()
>
> Martijn
>
> On Tue, Dec 16, 2008 at 10:51 AM, Adriano dos Santos Fernandes
> <ad...@uol.com.br> wrote:
>   
>> No good/better way? The problem of using the web directory is that I can't
>> do that with non-web utility projects in Eclipse and have the files being
>> contributed to web projects.
>>
>>
>> Adriano
>>
>>
>> Adriano dos Santos Fernandes escreveu:
>>     
>>> Hi!
>>>
>>> What is the better way to handle CSS urls [background: url(...)], inside
>>> HTML <style> tags?
>>>
>>> As I see, <wicket:link> doesn't work, so I'm writing url(style.css) and
>>> putting style.css on the normal html directory. Obviously, this don't work
>>> if I mount pages with path different than "/".
>>>
>>>
>>> Adriano
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>
>>>       
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>>     
>
>
>
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: CSS urls

Posted by Martijn Dashorst <ma...@gmail.com>.
See HeaderContributor.forCss()

Martijn

On Tue, Dec 16, 2008 at 10:51 AM, Adriano dos Santos Fernandes
<ad...@uol.com.br> wrote:
> No good/better way? The problem of using the web directory is that I can't
> do that with non-web utility projects in Eclipse and have the files being
> contributed to web projects.
>
>
> Adriano
>
>
> Adriano dos Santos Fernandes escreveu:
>>
>> Hi!
>>
>> What is the better way to handle CSS urls [background: url(...)], inside
>> HTML <style> tags?
>>
>> As I see, <wicket:link> doesn't work, so I'm writing url(style.css) and
>> putting style.css on the normal html directory. Obviously, this don't work
>> if I mount pages with path different than "/".
>>
>>
>> Adriano
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>



-- 
Become a Wicket expert, learn from the best: http://wicketinaction.com
Apache Wicket 1.3.4 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: CSS urls

Posted by Adriano dos Santos Fernandes <ad...@uol.com.br>.
No good/better way? The problem of using the web directory is that I 
can't do that with non-web utility projects in Eclipse and have the 
files being contributed to web projects.


Adriano


Adriano dos Santos Fernandes escreveu:
> Hi!
>
> What is the better way to handle CSS urls [background: url(...)], 
> inside HTML <style> tags?
>
> As I see, <wicket:link> doesn't work, so I'm writing url(style.css) 
> and putting style.css on the normal html directory. Obviously, this 
> don't work if I mount pages with path different than "/".
>
>
> Adriano
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org