Fórum

Image as Web Content Background?

thumbnail
David Lynch, modificado 12 Anos atrás.

Image as Web Content Background?

New Member Postagens: 5 Data de Entrada: 23/01/09 Postagens Recentes
We have started to use Liferay to develop an Intranet at work.

I would like to know if it is possible (and if so - how) to use an image as the background in a web content page?
thumbnail
Priyanka Dhingra, modificado 12 Anos atrás.

RE: Image as Web Content Background?

Liferay Master Postagens: 501 Data de Entrada: 20/12/11 Postagens Recentes
Hi

In structure and template Use <style> tag in the launch Editor for the web Content in which you can set background image then keep the content in a particular <div> throughout and this<div> has this style id attribute.

This should work....
Regards
Priyanka
thumbnail
David Lynch, modificado 12 Anos atrás.

RE: Image as Web Content Background?

New Member Postagens: 5 Data de Entrada: 23/01/09 Postagens Recentes
Priyanka Dhingra:
you can add your custom theme, wherein you can modify _diff/css/custom.css in which you can set background image.



Ah, ok so i now need to learn how to create custom themes. emoticon
thumbnail
Priyanka Dhingra, modificado 12 Anos atrás.

RE: Image as Web Content Background?

Liferay Master Postagens: 501 Data de Entrada: 20/12/11 Postagens Recentes
Sorry, but I got something, better try that emoticon
thumbnail
David Lynch, modificado 12 Anos atrás.

RE: Image as Web Content Background?

New Member Postagens: 5 Data de Entrada: 23/01/09 Postagens Recentes
OK guys so i stuck this is code in
<style type="text/css">body {background-image:url(/image/image_gallery?uuid=53e5631d-50b2-4591-9d4c-9f3b23d86f52&groupId=11483&t=1332867614436);}</style>

But instead of the image appearing within the Web Content Page it is filling the whole background of my screen. I can attach a screen shot if that helps

Am pretty new to this so be gentle

emoticon
thumbnail
Priyanka Dhingra, modificado 12 Anos atrás.

RE: Image as Web Content Background?

Liferay Master Postagens: 501 Data de Entrada: 20/12/11 Postagens Recentes
<style type="text/css">
#myImageId {
background-image:url(/image/image_gallery?uuid=53e5631d-50b2-4591-9d4c-9f3b23d86f52&groupId=11483&t=1332867614436);
}</style>
<div id="myImageId">
//put all you content and tags here
</div>

Use this in your template's launch editor.

If, in case you are new to structure and template...you can see this
http://content.liferay.com/4.2/doc/user/liferay_4_content_management_system_guide/multipage/ch03s02.html
thumbnail
David Lynch, modificado 12 Anos atrás.

RE: Image as Web Content Background? (Resposta)

New Member Postagens: 5 Data de Entrada: 23/01/09 Postagens Recentes
Absolutely brilliant!!! Thank you very much!