Design and CSS styles
Version 5.x > Design and CSS styles > Set CSS class on web part View modes: 
User avatar
Member
Member
Paul T - 1/4/2011 6:38:57 AM
   
Set CSS class on web part
Hi,
I'm new to Kentico and am having a problem applying a CSS style (class attribute) to an editable text web part - it ultimately renders as a DIV tag. I thought I could apply this via the "web part container" property but no luck. Can anyone provide some guidance?
Thanks,
Paul

User avatar
Kentico Support
Kentico Support
kentico_zdenekc - 1/4/2011 6:59:01 AM
   
RE:Set CSS class on web part
Hi,

You can use the WebPart containers, as described in DevGuide - Web part containers overview and the next article about creating them. There you could specify the class of the enveloping DIV element.

Faster option for just the div wrapper could be using Content before and Content after properties like:
ContentBefore = <div class="YourClass">
ContentAfter = </div>

Regards,
Zdenek

User avatar
Member
Member
Paul T - 1/4/2011 11:17:22 AM
   
RE:Set CSS class on web part
Thank you Zdenek for the quick reply and good advice.

User avatar
Kentico Support
Kentico Support
kentico_zdenekc - 1/4/2011 11:26:31 AM
   
RE:Set CSS class on web part
Hi,
You're welcome.

Regards,
Zdenek