Re: background: url(${context: image}) in CSS file?
Use a relative path. In my applications I store my CSS in: src/main/webapp/assets/styles/ And my images in: src/main/webapp/assets/images/ An example of using a relative path in my CSS file: background-image: url('../images/logo.png'); The path is relative to the CSS file and NOT the page, so this should work fine on all pages. Hope this helps, Daniel deian wrote: > > Hi Guys, > > What can we do about using tapestry variables in the CSS files? > > I have a css file in where I want to use an image as background. So I want > to use something along the lines: > > mySite.css > > .mystyle { > background: url(${context:images/myImage.png}); > } > > Any ideas? > > Cheers, > Deian > -- View this message in context: http://www.nabble.com/background%3A-url%28%24%7Bcontext%3A-image%7D%29-in-CSS-file--tp25786987p25802983.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: background: url(${context: image}) in CSS file?
Em Wed, 07 Oct 2009 10:49:16 -0300, deian escreveu: Hi Guys, Hi! What can we do about using tapestry variables in the CSS files? You could create a page class that returns CSS, but I haven't used this approach. I add a
Re: background: url(${context: image}) in CSS file?
Hello Why not using relative paths ? Christophe. 2009/10/7 deian > > Hi Guys, > > What can we do about using tapestry variables in the CSS files? > > I have a css file in where I want to use an image as background. So I want > to use something along the lines: > > mySite.css > > .mystyle { > background: url(${context:images/myImage.png}); > } > > Any ideas? > > Cheers, > Deian > -- > View this message in context: > http://www.nabble.com/background%3A-url%28%24%7Bcontext%3A-image%7D%29-in-CSS-file--tp25786987p25786987.html > Sent from the Tapestry - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > >
background: url(${context: image}) in CSS file?
Hi Guys, What can we do about using tapestry variables in the CSS files? I have a css file in where I want to use an image as background. So I want to use something along the lines: mySite.css .mystyle { background: url(${context:images/myImage.png}); } Any ideas? Cheers, Deian -- View this message in context: http://www.nabble.com/background%3A-url%28%24%7Bcontext%3A-image%7D%29-in-CSS-file--tp25786987p25786987.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org