Add CSS class to img element

Author Message

paul bolger

Wednesday 28 February 2007 3:29:36 pm

I normally add borders to images by adding a class to the HTML img element - seems silly to add it to a wrapper element.

It would be nice to be able to add this to the image properties dialogue - does anyone know how this could be done? Obviously this is an option (border yes/no).

Regards
Paul Bolger

Paul Bolger

Betsy Gamrat

Wednesday 28 February 2007 6:28:07 pm

http://ez.no/doc/extensions/online_editor/4_x/usage/formatted_text/the_class_parameter

paul bolger

Saturday 03 March 2007 10:30:27 pm

Thanks Betsy, but it's not that simple. you can add classes to most HTML using the class parameter, but I don't think it works for the img element. There is a border style in one of the image templates but it doesn't seem to work in 3.86 because of a CSS error (it doesn't specify width or color). I'll check 3.9 and put in a bug report if it hasn't been fixed there.

Paul Bolger

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 18 2025 11:09:47
Script start
Timing: Jan 18 2025 11:09:47
Module start 'layout'
Timing: Jan 18 2025 11:09:47
Module start 'content'
Timing: Jan 18 2025 11:09:48
Module end 'content'
Timing: Jan 18 2025 11:09:48
Script end

Main resources:

Total runtime0.6300 sec
Peak memory usage4,096.0000 KB
Database Queries57

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0064 589.3438152.6250
Module start 'layout' 0.00640.0034 741.968839.4453
Module start 'content' 0.00970.6188 781.4141536.0547
Module end 'content' 0.62850.0014 1,317.468812.1641
Script end 0.6299  1,329.6328 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00320.5107160.0002
Check MTime0.00140.2151160.0001
Mysql Total
Database connection0.00100.155410.0010
Mysqli_queries0.584492.7716570.0103
Looping result0.00050.0819550.0000
Template Total0.596994.720.2984
Template load0.00220.350720.0011
Template processing0.594694.394320.2973
Template load and register function0.00010.015110.0001
states
state_id_array0.00100.165910.0010
state_identifier_array0.00070.113520.0004
Override
Cache load0.00180.2926140.0001
Sytem overhead
Fetch class attribute can translate value0.00090.150720.0005
Fetch class attribute name0.00090.149050.0002
XML
Image XML parsing0.00090.140320.0004
class_abstraction
Instantiating content class attribute0.00000.001760.0000
General
dbfile0.00090.1411220.0000
String conversion0.00000.006940.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
3content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
3content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
4content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 13
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs