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

Forums / Designing & Styling / Issue with Theme during page edit.

Issue with Theme during page edit.

2 posts, 0 answered
  1. Darren
    Darren avatar
    1 posts
    Registered:
    01 Jul 2013
    19 Aug 2013
    Link to this post
    We have created a theme and have added into the CMS. The theme has been applied to the page and applies the style correctly when viewing the page.  The issue we are experiencing is during page edit mode. The theme causes content to be displayed past the bounds of the preview area. This is causing some elements to be displayed over the admin tool bars while other elements are hidden underneath the tool bar on the right side of the screen.

  2. Jonathan
    Jonathan avatar
    119 posts
    Registered:
    19 Dec 2012
    20 Aug 2013 in reply to Darren
    Link to this post
    When I run into styling issues in the backend with my custom master pages I usually create a "Design" CSS file.  In the code behind of the master page i check to see if the page is in design mode, if it is insert the custom CSS with the styling that is needed to correct the issue for the back end.  I find if you "float" elements at all it will cause some havoc in the backend.

    Code behind of master page.

    protected void Page_Load(object sender, EventArgs e)
            {
                if (this.IsDesignMode())
                {
                    HtmlLink designCss = new HtmlLink() { Href = "/Sitefinity/WebsiteTemplates/{ThemeFolder}/App_Themes/{ThemeFolder}/Styles/design.css" };
                    designCss.Attributes["rel"] = "stylesheet";
                    designCss.Attributes["type"] = "text/css";
                    designCss.Attributes["media"] = "all";
                    Page.Header.Controls.Add(designCss);
                }
            }

    Good Luck!
2 posts, 0 answered