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="" 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="" 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