More in this section
Forums / Developing with Sitefinity / I need to have a base CSS class around all controls

I need to have a base CSS class around all controls

The forums are in read-only mode. In case that you want to directly contact the Progress Sitefinity team use the support center. In our Google Plus group you can find more than one thousand Sitefinity developers discussing different topics. For the Stack Overflow threads don’t forget to use the “Sitefinity” tag.
2 posts, 0 answered
  1. David Sims
    David Sims avatar
    1 posts
    24 May 2010
    25 May 2010
    Link to this post
    hi all,

    I'd like to have a default CSS class wrapped around any control that is placed on a page in sitefinity. Ideally I'd like div tags to wrap all code generated by controls. The resulting html from adding say a generic content control might look like this:

    <div class="sitefinityControl">This is text from a generic content control.</div>

    I'd like this to happen for ALL controls..

    Is there a base class somewhere I can modify to allow me to do this?
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    12 Sep 2017
    25 May 2010
    Link to this post
    Hi David Sims,

    There is not a common base class that you could use to add css for all control. You could do this for a single control or add the div around the ContentPlaceHolder that is used on your master page. If you want to do this for GenericContentControl, you could map the external template for this control - GenericContentDesigner and use editor.get_html(); and set_html() on OnClientSubmit to wrap the content in a div tag.

    Ivan Dimitrov
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
2 posts, 0 answered