You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@forrest.apache.org by Qin Ding <qd...@csc.com> on 2005/08/30 19:15:23 UTC
Re:
When I tried to use align="top" attribute in img element for xdocs xml (ie
<img src="../../images/1920.gif" width="155" height="81" ALIGN="TOP"
alt="1920s image"/>, I got the invalid error: Attribute "ALIGN" must be
declared for element type "img". [49].
The purpose of using it is to align the text top with the image top, so
that the text wraps around img. How do I use it in forrest document?
Please advise. Thanks.
Qin
----------------------------------------------------------------------------------------
This is a PRIVATE message. If you are not the intended recipient, please
delete without copying and kindly advise us by e-mail of the mistake in
delivery. NOTE: Regardless of content, this e-mail shall not operate to
bind CSC to any order or other contract unless pursuant to explicit
written agreement or government initiative expressly permitting the use of
e-mail for such purpose.
----------------------------------------------------------------------------------------
Re: alt="top" in img element (was Re: )
Posted by Qin Ding <qd...@csc.com>.
Thank you, Ross, for your help.
Qin
----------------------------------------------------------------------------------------
This is a PRIVATE message. If you are not the intended recipient, please
delete without copying and kindly advise us by e-mail of the mistake in
delivery. NOTE: Regardless of content, this e-mail shall not operate to
bind CSC to any order or other contract unless pursuant to explicit
written agreement or government initiative expressly permitting the use of
e-mail for such purpose.
----------------------------------------------------------------------------------------
Ross Gardler <rgardler
@apache.org>
08/30/2005 12:44 PM
Please respond to user
To: user@forrest.apache.org
cc:
Subject: alt="top" in img element (was Re: )
(please using meaningful subject lines in your emails)
Qin Ding wrote:
>
> When I tried to use align="top" attribute in img element for xdocs xml
> (ie <img src="../../images/1920.gif" width="155" height="81" ALIGN="TOP"
> alt="1920s image"/>, I got the invalid error: Attribute "ALIGN" must be
> declared for element type "img". [49].
It doesn't validate because it is not allowed in our DTD. See
http://forrest.apache.org/dtdx/document-v20.dtdx.html#img
The reason it is not allows is because this is layout information and
should not be part of the source document but part of the CSS describing
the layout.
To achieve what you want you will have to give your img element a class
like this:
<img src="../../images/1920.gif" width="155" height="81"
alt="1920s image" class="topAligned"/>
Then in your skinconf.xml file add this class to the extra-css element,
defining it as you require, for example:
img.topAligned { vertical-align:text-top }
For reference materials on CSS see
http://www.w3schools.com/css/default.asp
Ross
alt="top" in img element (was Re: )
Posted by Ross Gardler <rg...@apache.org>.
(please using meaningful subject lines in your emails)
Qin Ding wrote:
>
> When I tried to use align="top" attribute in img element for xdocs xml
> (ie <img src="../../images/1920.gif" width="155" height="81" ALIGN="TOP"
> alt="1920s image"/>, I got the invalid error: Attribute "ALIGN" must be
> declared for element type "img". [49].
It doesn't validate because it is not allowed in our DTD. See
http://forrest.apache.org/dtdx/document-v20.dtdx.html#img
The reason it is not allows is because this is layout information and
should not be part of the source document but part of the CSS describing
the layout.
To achieve what you want you will have to give your img element a class
like this:
<img src="../../images/1920.gif" width="155" height="81"
alt="1920s image" class="topAligned"/>
Then in your skinconf.xml file add this class to the extra-css element,
defining it as you require, for example:
img.topAligned { vertical-align:text-top }
For reference materials on CSS see http://www.w3schools.com/css/default.asp
Ross