+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Contentplaceholder Sizing

Contentplaceholder Sizing

7 posts, 0 answered
  1. Neil
    Neil avatar
    30 posts
    Registered:
    20 Jan 2009
    18 Oct 2010
    Link to this post
    Hi all,

    This is my first site using Sitefinity. My question relates to the sizing of the contentplaceholder when it is displayed in the edit mode. The contentplaceholder is sizing quite widely and I would like to control how it displays to the page editor. The intent is a fixed width variable length contentplaceholder. Any suggestions on how to achieve this? I'm trying with divs, but not achieving the result I'm looking for.
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    09 Dec 2016
    18 Oct 2010
    Link to this post
    Hello Neil,

    You can edit the ContentPlaceHolder size in edit mode by modifying

    Sitefinity\Admin\Themes\Default\PageEditor.css and Sitefinity\Admin\Themes\Default\PageEditorOverlay.css classes. You have to modify controlWrapper class where you could set width and height.

    Sincerely yours,
    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
  3. Neil
    Neil avatar
    30 posts
    Registered:
    20 Jan 2009
    18 Oct 2010
    Link to this post
    Thanks for the prompt reply Ivan! What I'm trying to figure out is a way to have the edit mode look like the finished page, where the contentplaceholder can grow in height (its within a table already) but stay to a fixed width. Is there a way to change the default as you suggested to have it abide by the width imposed by the table?
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    09 Dec 2016
    20 Oct 2010
    Link to this post
    Hi Neil,

    If you modify PageEditorOverlay.css i PageEditor.css you can set fixed width size for the ContentPlaceholder, but actually you cannot see how the page will look like in edit mode and this is why you have "Preview" button. The page area in edit mode is smaller because of the header bar and toolbox section. Anyway you could attach a screenshot of your idea, so I could try to come up with a solution if there is.

    Best wishes,
    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
  5. Neil
    Neil avatar
    30 posts
    Registered:
    20 Jan 2009
    23 Oct 2010
    Link to this post
    Was watching one of Gabe's webinars, and his master page shows what I'm looking to do. His contentplaceholders are different sizes, and reflect the actual size that they are in his page. How do you accomplish this?
  6. Neil
    Neil avatar
    30 posts
    Registered:
    20 Jan 2009
    24 Oct 2010
    Link to this post
    So I happened to be playing with the theme for the page (had created my own in order to skin the combobox), and it seems that when using the other themes the contentplaceholders size to where they are placed in the table? Can you point out to me what in the standard site theme css needs to be in my theme css to control the placeholders the way I want?
  7. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    09 Dec 2016
    24 Oct 2010
    Link to this post
    Hi Neil,

    You can use the ContentPlaceHolder selectors in your theme stylesheet and set the width and/or height

    #Header
      {
         width: 100px;
      }
    #Main
      {
        width: 65%;    
      }


    Regards,
    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
Register for webinar
7 posts, 0 answered