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

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