Forums / Setup & design / Image Alignment

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

eZ debug

Timing: Jan 31 2025 01:30:45
Script start
Timing: Jan 31 2025 01:30:45
Module start 'content'
Timing: Jan 31 2025 01:30:45
Module end 'content'
Timing: Jan 31 2025 01:30:45
Script end

Main resources:

Total runtime0.2840 sec
Peak memory usage8,192.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0068 587.8203370.3125
Module start 'content' 0.00680.0205 958.13281,005.5938
Module end 'content' 0.02730.2567 1,963.72663,893.8906
Script end 0.2840  5,857.6172 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00451.5829200.0002
Check MTime0.00130.4686200.0001
Mysql Total
Database connection0.00070.260210.0007
Mysqli_queries0.179263.08571410.0013
Looping result0.00160.58021390.0000
Template Total0.256290.210.2562
Template load0.00090.324910.0009
Template processing0.255389.875310.2553
Override
Cache load0.00060.218710.0006
Sytem overhead
Fetch class attribute can translate value0.00210.724610.0021
XML
Image XML parsing0.00030.109510.0003
General
dbfile0.00471.6629200.0002
String conversion0.00000.002130.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs