Image Alignment

Author Message

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

Ashley Knowles

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...

Łukasz Serwatka

Thursday 20 April 2006 12:47:58 am

That classes by default are in the design/base/stylesheets/classes.css

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 31 2025 03:43:06
Script start
Timing: Jan 31 2025 03:43:06
Module start 'layout'
Timing: Jan 31 2025 03:43:06
Module start 'content'
Timing: Jan 31 2025 03:43:07
Module end 'content'
Timing: Jan 31 2025 03:43:07
Script end

Main resources:

Total runtime1.4844 sec
Peak memory usage8,192.0000 KB
Database Queries60

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0043 588.0078151.1953
Module start 'layout' 0.00430.0040 739.2031220.6719
Module start 'content' 0.00831.4751 959.87504,460.2734
Module end 'content' 1.48350.0009 5,420.148411.8828
Script end 1.4843  5,432.0313 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00370.2492160.0002
Check MTime0.00130.0867160.0001
Mysql Total
Database connection0.00060.039310.0006
Mysqli_queries1.389693.6147600.0232
Looping result0.00080.0517580.0000
Template Total1.429296.320.7146
Template load0.00220.146720.0011
Template processing1.427096.133320.7135
Template load and register function0.00210.140110.0021
states
state_id_array0.00190.126910.0019
state_identifier_array0.00270.182020.0014
Override
Cache load0.00180.1211230.0001
Sytem overhead
Fetch class attribute can translate value0.00310.211320.0016
Fetch class attribute name0.00300.204450.0006
XML
Image XML parsing0.00080.054920.0004
class_abstraction
Instantiating content class attribute0.00000.001260.0000
General
dbfile0.00160.1087180.0001
String conversion0.00000.000540.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
4content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
7content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
3content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 19
 Number of unique templates used: 7

Time used to render debug report: 0.0002 secs