[opencms-dev] css problem

Christian Steinert christian_steinert at web.de
Sun Jul 23 10:58:17 CEST 2006


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 --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3269 bytes
Desc: S/MIME Cryptographic Signature
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20060723/4c2dc034/attachment.bin>


More information about the opencms-dev mailing list