Dear Mr. Shafie,

In my css file I have:

Image>ImageEntity {
    display: block;
    content: image-viewport(attribute, "FileName",
    data-type, anyURI,
    viewport-width, 100%,
    content-width, attr(Width),
    horizontal-align, attr(HorizontalAlignment),
    fallback-image, url(70x135.gif));
}

I assume that viewport-width, 100%, means: 100% of the XMLmind-Window-Width?


In the xml file I have: 

 <Image>
      <Title>Titel ...</Title>
      <ImageEntity FileName="../img/screen.jpg" HorizontalAlignment="right"
Width="4cm" />
      <Body>Legende ...</Body>
 </Image>
 
I get the result shown in screen.jpg in the attachment. But I would like to
have the image alligned with the right border of the XMLmind-Window.

Thank you for your assistance!

Kindest regards
Thomas Dumm

 

> -----Urspr?ngliche Nachricht-----
> Von: Hussein Shafie [mailto:hussein at xmlmind.com] 
> Gesendet: Donnerstag, 14. August 2008 12:38
> An: Thomas Dumm
> Cc: xmleditor-support at xmlmind.com
> Betreff: Re: [XXE] image-viewport
> 
> Thomas Dumm wrote:
> > I am not shure, but to me it looks as if the image-viewport-width 
> > given as a percentage of the available space does not work 
> properly. 
> > It does not have any effect in my layout. But I am not shure if I 
> > understand the meaning of the viewport-width correctly. Could you 
> > please confirm, that the behaviour of the key "viewport-width" is 
> > correct. Then I know that I have an error in my layout.
> >  
> 
> image-viewport() works as described here:
> http://www.xmlmind.com/xmleditor/_distrib/doc/csssupport/image
> -viewport.html
> 
> May be you forgot to append a "%" after the value passed to 
> the viewport-width parameter or may be you made a mistake in 
> the other properties of the elements you are styling (e.g. 
> improper value of
> display) or may be you need to use content-width rather than 
> viewport-width.
> 
> XHTML example:
> ---
> img {
>     display: block;
>     content: image-viewport(attribute, src,
>                           data-type, anyURI,
>                           viewport-width, 50%,
>                             viewport-height, 10cm,
>                             horizontal-align, right,
>                             vertical-align, bottom); }
> ---
> 
> See attached screenshot.
> 
> Note that generally you'll want to specify the percentage 
> from the value of an attribute. It can be done like this:
> ---
> viewport-width, xpath("concat(@foo,'%')"),
> ---
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: screen.jpg
Type: image/jpeg
Size: 53586 bytes
Desc: not available
Url : 
http://www.xmlmind.com/pipermail/xmleditor-support/attachments/20080815/05d01410/attachment.jpg
 

Reply via email to