Elxis CMS Forum

Support => General => Topic started by: rentasite on October 27, 2008, 17:00:44

Title: Custom module + image background
Post by: rentasite on October 27, 2008, 17:00:44

Hi, this might sound silly but im stuck so decided to post a question  ;D

I want to create and use 3-4 custom modules (with just text) on my site. And i want each of these module's to use a different image as background.

Can this be done !!?!?!?%^%&$#
Title: Re: Custom module + image background
Post by: Farhad Sakhaei on October 27, 2008, 17:06:45
Use a table with 100% width and set it's background to that you like , Then insert the text in that cell of table :)
Title: Re: Custom module + image background
Post by: Ivan Trebješanin on October 27, 2008, 17:18:27
You can create your modules, and then give them some module suffix. With that done, you will be able to style each module separately. Simple enough? ;)
Title: Re: Custom module + image background
Post by: rentasite on October 27, 2008, 17:24:49

Thanks guys i will update this ticket after i try your solutions tonight :)
Title: Re: Custom module + image background
Post by: datahell on October 27, 2008, 18:57:53
You can write inline CSS inside your custom modules. I do this all the time.
Turn the editor in html mode and insert any html you like in it.

Here is an example:

<div style="margin: 10px auto; text-align: center; background: #fff url('http://www.mysite.com/mybg.png') top left no-repeat;">
      content here
</div>

In this case it might be better to load this module "naked" (style = -1).
Title: Re: Custom module + image background
Post by: rentasite on October 28, 2008, 01:28:23
You can write inline CSS inside your custom modules. I do this all the time.
Turn the editor in html mode and insert any html you like in it.

THANK YOU YIANNI  ;D  Ur way is very easy!!! Thanks!!!

I want the modules in that way, for SEO reasons :)
Title: Re: Custom module + image background
Post by: datahell on October 28, 2008, 11:10:45
Inline CSS is a very quick way to apply style and is XHTML valid. If you need to apply the same css several times then you better create a css class in your template's css file and use it where you like. You can apply inline css everywhere, not just in modules. You can use it in sections/categories descriptions, inside content items, etc.