Image classes?

Post here questions and problems related to editing and publishing DITA content.
kgajda
Posts: 32
Joined: Wed Aug 16, 2017 8:07 pm

Image classes?

Post by kgajda »

Does oxygen give you enough flexibility to apply individual class tags to images? ie: <img src="something.png" class="unity-img"> so that I can create a class for css styling for some images but not others?
Thanks!
Kim
bogdan_cercelaru
Posts: 222
Joined: Tue Jul 01, 2014 11:48 am

Re: Image classes?

Post by bogdan_cercelaru »

Hello,

Yes, you can obtain a custom CSS class in the generated output using the @outputclass attribute in the DITA topic. The value of this attribute will be found in the resulted @class attribute in the output.
For example, if your DITA topic contains

Code: Select all

<image href="path/to/image" outputclass="mystyle"/>
the resulted output contains

Code: Select all

<img class="image mystyle" src="path/to/image"/>
Regards,
Bogdan
Bogdan Cercelaru
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
Post Reply