Forums / Setup & design / Several css styles

Several css styles

Author Message

Catherine Mollet @work

Monday 14 September 2009 5:15:58 am

Hello,
I don't know if it's possible unless I didn't find answer, but how could I apply several css classes to one element ? Let me explain : I have a top page with a h2 as first thing. I would like that this h2 have a specific color, for example red, created in the css file like

     h2.red {color: red;}
 

and as it's at the top of the page, that it doesn't have any top margin, different to other h2

     h2.pagetop {margin-top: 0;}
 

How is it possible to have at the end something like

     <h2 class="red pagetop">My title</top>
 

With the [header] tag, I'm only able to select one css style.

Thank you.

Łukasz Serwatka

Monday 14 September 2009 6:23:49 am

This looks like candidate for an enhancement in OE to support multiselect box. You can try disable OE and input that class manually like: <header class="red blue">text

Make sure you have defined that classes in content.ini.append.php

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

Catherine Mollet @work

Monday 14 September 2009 8:50:43 am

Thanks for your answer. Sure it would be a useful enhancement :-)
In the meanwhile, I will try your solution.
(Classes are already defined !)

Catherine Mollet @work

Tuesday 15 September 2009 1:59:49 am

Too bad, Lukasz's solution doesn't work :-(
Error message is :

The draft could not be stored.
Required data is either missing or is invalid:
* Body: Class 'red pagetop' is not allowed for element <header> (check content.ini).

Another great enhancement of eZ would be the possibility to add <div> in OE !

Łukasz Serwatka

Tuesday 15 September 2009 2:22:31 am

Yes, I have checked that too. That explains why multi-select box was not used. Feel free to fill up enhancement request if does not exists yet.

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

eZ debug

Timing: Jan 29 2025 23:52:35
Script start
Timing: Jan 29 2025 23:52:35
Module start 'content'
Timing: Jan 29 2025 23:52:35
Module end 'content'
Timing: Jan 29 2025 23:52:35
Script end

Main resources:

Total runtime0.1708 sec
Peak memory usage2,048.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0055 588.9609180.8438
Module start 'content' 0.00550.0066 769.804797.9609
Module end 'content' 0.01220.1585 867.7656527.0000
Script end 0.1707  1,394.7656 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00341.9980200.0002
Check MTime0.00140.8432200.0001
Mysql Total
Database connection0.00080.464510.0008
Mysqli_queries0.129075.54681410.0009
Looping result0.00090.55541390.0000
Template Total0.158292.610.1582
Template load0.00080.457410.0008
Template processing0.157492.172210.1574
Override
Cache load0.00050.321010.0005
Sytem overhead
Fetch class attribute can translate value0.00050.303910.0005
XML
Image XML parsing0.00020.121710.0002
General
dbfile0.00744.3211200.0004
String conversion0.00000.002930.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.0002 secs