|
Hi,
I have a problem with using 'background-image' property in view file. For example:
<xhtml:html xmlns:xforms="http://www.w3.org/2002/xforms"
xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:xxforms="http://orbeon.org/oxf/xml/xforms" xmlns:f="http://orbeon.org/oxf/xml/formatting"> <xhtml:head>
<xhtml:title>CSS Example</xhtml:title> <xhtml:style type="text/css"> .image-css { background-image: url('_8.gif');} </xhtml:style> <xforms:model> <xforms:instance> <instance xmlns=""> <url/> </instance> </xforms:instance> </xforms:model> </xhtml:head> <xhtml:body> <xhtml:div id="image-css" >Binding with CSS</xhtml:div> </xhtml:body> </xhtml:html>
The '_8.gif' and view.xhtml in same folder. Then the result is wrong! I find that it is right when 'background-image' using in css file and value of 'background-image' is relative value. But I want to use 'background-image' in view file.
How can I do it?
-- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
|
Thank you for Erik Bruchez.
First: It is mine mistake. I use class='image-css' in view, for example:
<xhtml:div class="image-css" >Binding with CSS</xhtml:div>
Second: view.xhtml and _8.gif is in that folder:
/apps/my-app/view.xhtml
/apps/my-app/_8.gif
In the view,
1. When the css code is like that:
.image-css { background-image: url('../my-app/_8.gif');}
It is right(url is relative). 2. When the css code is like that:
.image-css { background-image: url('/apps/my-app/_8.gif');}
It is wrong(url is absolute). 3. When the css code is like that:
.image-css { background-image: url('/ops/apps/my-app/_8.gif');}
It is right(url is absolute. The 'ops' is value of tomcat context). I want to use absolutely url in css code. How can I do it?
在2007-05-09,"Erik Bruchez" <[hidden email]> 写道: 免费试玩2006中国最佳网络游戏--梦幻西游 -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
|
Thanks for Erik Bruchez.
在2007-05-10,"Erik Bruchez" <[hidden email]> 写道: 免费试玩2006中国最佳网络游戏--梦幻西游 -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
|
In reply to this post by hcr
Thanks for Erik Bruchez !
在2007-05-10,"Erik Bruchez" <[hidden email]> 写道: 免费试玩2006中国最佳网络游戏--梦幻西游 -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
| Free forum by Nabble | Edit this page |
