[opencms-dev] css problem
vikas gupta
vikas.gupta at daffodildb.com
Tue Jul 25 05:27:31 CEST 2006
Hi all,
I have created my own css class with the same name as div.ocms_de_norm. It
is working fine for background color. But for
padding-top: 1px;
padding-bottom: 1px;
I am unable to get these properties in javascript. I am using
Document.getElementByTagName("div").className.paddingTop to get this
property. It is giving undefined.
One more thing editable tag has only one attribute file. Can it be a css
file?
Regards
Vikas
-----Original Message-----
From: opencms-dev-bounces at opencms.org
[mailto:opencms-dev-bounces at opencms.org] On Behalf Of Christian Steinert
Sent: Sunday, July 23, 2006 2:28 PM
To: The OpenCms mailing list
Subject: Re: [opencms-dev] css problem
Vikas Jain schrieb:
>
>
> Hi List,
>
> Can I override the default css provided by opencms for editable.
>
> I want to override the following css part::
>
>
>
> div.ocms_de_norm {
>
> width: 100%;
>
> padding-top: 1px;
>
> padding-bottom: 1px;
>
> }
>
>
>
> Thanx in advance.
>
>
>
> Regards
>
> Vikas
I see two ways of doing this
1. edit the stylesheet that comes with opencms (but you would lose your
changes whenever you upgrade to a new version
- OR -
2. a.) create an own stylesheet,
b.) add a different definition of that style inside your stylesheet
this new definition can overwrite the style properties
that you want to change
c.) include that stylesheet in your templates AFTER <cms:editable />
-BUT- include it only, if the the current project is not the
online project
(You should be able to use CmsRequestContext to find out, if
you are in the online project or not)
something like this should be enough:
cmsJspActionElement.getRequestContext().currentProject().isOnlineProject()
I would suggest the 2nd alternative.
Kind Regards,
Christian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20060725/8b78f6a7/attachment.htm>
More information about the opencms-dev
mailing list