forrest-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ross Gardler <rgard...@apache.org>
Subject alt="top" in img element (was Re: )
Date Tue, 30 Aug 2005 17:44:06 GMT
(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

Mime
View raw message