Design and CSS styles
Version 6.x > Design and CSS styles > Styles and Design Mode View modes: 
User avatar
Kentico Legend
Kentico Legend
Brenden Kehren - 8/23/2012 5:02:35 PM
   
Styles and Design Mode
I'm having some issues with my layout in design mode. In edit mode and the live site work great although when in Design mode, all my zones are messed up and I can't properly place webparts in the zones. Any documentation on this?

User avatar
Kentico Consulting
Kentico Consulting
kentico_borisp - 8/24/2012 7:21:17 AM
   
RE:Styles and Design Mode
Hello,

Regrettably, there is no documentation on this, since this is basically modification of the UI and not standardly supported. This usually happens, if some of your CSS styles which conflict with the UI styles in Kentico. Our usual approach is to debug the styles with some debugging tool (F12, firebug) to see, what is causing the conflict.

Best regards,
Boris Pocatko

User avatar
Kentico Legend
Kentico Legend
Brenden Kehren - 8/24/2012 9:18:34 AM
   
RE:Styles and Design Mode
How is it modification of the UI? All I've done is create a master page, create a layout for additional pages, createa new page and tell it to use the master page and the layout I've provided. This is standard functionality of Kentico, nothing I've done was custom or modifying the UI.

Are you saying it's possible my class names are the same as what Kentico uses for the UI and that could be causing the issue? It has essentially made Design mode useless as I can't access any of the webpart areas to place webparts.

User avatar
Certified Developer 8
Certified Developer 8
Jiveabillion - 8/24/2012 1:09:37 PM
   
RE:Styles and Design Mode
I'm not sure what the exact cause of the issue you're having is, but I do know that the design mode can sometimes screw with the layout if your widths and margins are so precise that adding one or more pixels to it will cause floated columns to clear other columns and go underneath them.

The body tag has classes added to it in design and edit mode that you can leverage to modify the styles when in those modes. for example:



.rightColumn
{
float:left;
width:300px;
margin-left:20px
}
.DesignMode .rightColumn
{
margin-left:18px /*remove some pixels to account for the added padding or margin from the widget zone*/
}


This is just made up example. I can't remember the exact styles I had to change to make it look right in design mode, but they were similar to my example. This works for me. I hope it works for you.

P.S. It is also possible that your class names are the same as ones used by Kentico, but it would only make sense if the style sheet were only added in designmode (which I don't think it is)

User avatar
Kentico Legend
Kentico Legend
Brenden Kehren - 8/24/2012 4:40:51 PM
   
RE:Styles and Design Mode
I had thought I saw some class names like that in the default.css styles. Thanks Jiva, I'll try that out.

User avatar
Kentico Legend
Kentico Legend
Brenden Kehren - 8/28/2012 8:57:33 AM
   
RE:Styles and Design Mode
Figured out I had some bad CSS and unclosed tags. Once I worked those out, all aligned good. It was all in an attempt to make left and right columns (w/left nav) and have editable zones in both the master page and individual pages.

I'm trying to setup a master page to have left navigation and right content. Although I would like the left column to have the navigation, and a webpart zone below that is editable from the root level. Then from an individual page level I'd like to have a webpart zone below the root webpart zone to customize whatever they'd like within each of those pages. For instance, website has 100 pages and all 100 of the pages have 2 google ads just under the left nav. But when someone navigates to a nested level, say website.com/Products/Details/ the designer would be able to add another google ad below the other 2 ads on the master but not remove the 2 ads that were already on there.

Here is my simple layout:

<div id="header"></div>
<div id="page" class="container">
<div id="page_inner" class="row">
<div id="sidebar">
<div id="sidebar_inner">
<div class="nav">
<cc1:CMSWebPartZone ID="zoneNav" runat="server" />
</div>
<div class="aside">
<cc1:CMSWebPartZone ID="zoneSide" runat="server" />
<!-- have webparts in here for main master page and works great -->
<!-- want to have this area editable after the webparts I enter on the main master page on all sub pages -->
</div>
</div>
</div>
<div id="main">
<cc1:CMSWebPartZone ID="zoneMain" runat="server" />
<!-- have a placeholder in this webpart and page template/layouts works great -->
</div>
</div>
</div>
<div id="footer"></div>

User avatar
Kentico Consulting
Kentico Consulting
kentico_borisp - 8/30/2012 6:50:03 AM
   
RE:Styles and Design Mode
Hello,

We don't have any documentation on modifying the UI (CSS styles used in the UI). That's the UI modification I was talking about.

Regarding the last question, this is how Kentico works, if you have some content on the master page, then it is shown automatically on the sub pages. You could create some dynamic macro, which would hide the root web zone, if the sub zone is setup.

Best regards,
Boris Pocatko

User avatar
Kentico Legend
Kentico Legend
Brenden Kehren - 8/30/2012 7:37:44 AM
   
RE:Styles and Design Mode
I don't think I was clear on my last post. I understand how if whatever is on the master page will display on sub pages. What I want to do is what is in the image below. I can get the pages to display in "PagePlaceHolder" without issue. I also want to have the user be able to add webparts/content to the "PagePlaceHolder1" as well. I'm guessing I will have to modify the layout I've specified above.

User image

User avatar
Kentico Consulting
Kentico Consulting
kentico_borisp - 9/6/2012 4:29:10 AM
   
RE:Styles and Design Mode
Hello,

Regrettably, I think I still don't exactly know what you are trying to accomplish. If you are using a pageplaceholder you still have to have an another page which will generate the content into it, so you can't edit the content of the pageplaceholder1 on the root of the site.

Best regards,
Boris Pocatko

User avatar
Kentico Legend
Kentico Legend
Brenden Kehren - 9/10/2012 12:34:06 PM
   
RE:Styles and Design Mode
Thanks for taking the time with me Boris. The image above is my main masterpage. I have top (header not shown), left navigation (green), content (white, pageplaceholder) and footer (not shown). What I want on every page is to have the ability to add webparts to the area below the navigation (green area) and within the main content area.

What works now is I have all my pages inheriting the masterpage. They choose a layout and place webparts within it and it displays in the main content area (pageplaceholder). Works very well for what we are doing. What I need to happen along with the above is for the user to be able to add webparts below the navigation area on every page. I've tried doing this all within the layout although have had horrible success as for whatever reason my html gets messed up and some items I cannot generate dynamically.

User avatar
Kentico Consulting
Kentico Consulting
kentico_borisp - 9/17/2012 8:24:23 AM
   
RE:Styles and Design Mode
Hello,

I think I finally get what you are trying to do. However, I am not sure, how you are specifying the content of the left placeholder. Could you please describe, how you are getting the content to display to the left placeholder?

Best regards,
Boris Pocatko