Elxis CMS Forum

Extensions => Modules => Topic started by: apkoutsou on March 31, 2009, 12:52:36

Title: Module class suffix and css
Post by: apkoutsou on March 31, 2009, 12:52:36
I'm developing a small module for my site, but since it's the first time I do it, I faced this (simple i suppose) problem:

I have created a param for the class suffix, so that I can change the apearence of the module through the customize.css.
I have noticed that when a module is displayed Elxis uses the class "moduletable" (<div class="moduletable">) which is found in customize.css only as e.g.

#leftcolumn div.moduletable h3 et.c.

and when a suffix is set then the class turns to <div class="moduletable_sfx">.

So, which is the best way to add the new class? e.g.

create #leftcolumn div.moduletable_sfx h3
or straight #moduletable_sfx h3

thnx in advanced
Title: Re: Module class suffix and css
Post by: Ivan Trebješanin on March 31, 2009, 14:55:50
Hi apkoutsou,

moduletable is a class, so you cannot call it  #moduletable, you must select it as .moduletable

Other that that, it is all the same. Try to imagine you want to call a person who is sitting in the car. If you know his name, you can call him by name, if you don't, you can say: "hey, you in the car". That will do the trick if there are no other people in the car around.

If you give some suffix to moduletable, then it will have a name moduletable_suffix, so you can call it by name. That way, you can call only one element of many .moduletable elements.  ;)
Title: Re: Module class suffix and css
Post by: apkoutsou on April 03, 2009, 02:15:01
It's been long since I last did a css file (that's the minus when someone is an amateur) and I was a bit confused... I found the solution, so thanx Ivan!!!