Forums / Setup & design / Image Alignment
Ashley Knowles
Wednesday 19 April 2006 6:33:06 pm
I was reading http://ez.no/products/ez_publish/documentation/customization/components/datatypes/ezxmltext/tags trying to find a way to place an image in an article and align it (to produce html equivelant of <img src="..." align='right'>).
I tried embedding the image using both <embed href='ezobject://155' align='right' /> and <object id="155" align='right' />
Neither of these align properly...
The image shows correctly, but the alignment tag doesn't seem to be working, is there a more correct way for inserting an image???
Łukasz Serwatka
Wednesday 19 April 2006 11:39:09 pm
Hi Ashley,
What is the output source in web browser?You should have something similar:
<div class="object-right"><div class="content-view-embeddedmedia"> <div class="class-image"> <div class="attribute-image"> <p> <img src="/ezp/var/plain/storage/images/galleries/misc_flowers/purple_haze/280-1-eng-GB/purple_haze_small.jpg" width="100" height="75" style="border: 0px;" alt="Purple haze" title="Purple haze" /> </p> </div> <div class="attribute-caption" style="width: 100px"> <p> A small purple flower. </p> </div></div> </div>
This works fine with base design:
<embed href='ezobject://79' size='small' align='right' />
Perhaps CSS class for <div class="object-right"> is not definined in your CSS file.
"base" design uses 3 classes:
div.object-right { margin: 3px; float: right; } div.object-left { margin: 3px; float: left; } div.object-center { /* float: center;*/ margin-left: auto; margin-right: auto; text-align: center; }
Personal website -> http://serwatka.net Blog (about eZ Publish) -> http://serwatka.net/blog
Thursday 20 April 2006 12:05:22 am
Okay that worked... But why it wasn't in base/stylesheets/core.css or base/stylesheets/site.css CSS I don't know...
Thursday 20 April 2006 12:47:58 am
That classes by default are in the design/base/stylesheets/classes.css