I want to use one layout file in DNN for three pages. Each of the page has unique style(css). And most of the divs/section in those pages use class instead of id. Problem: In some cases the classes are applied to parent divs/section and their child are made editable. eg:
<div class="special-row">
<div id="div1" class="special-col" runat="server"/>
<div id="div2" class="special-col" runat="server"/>
</div>
As you can see there are containers inside special-row. Now say I have another page using the same layout and I need to add anothe class besides special-row, how should i do that. If i create another div eg:,
<div class="special-row">
<div id="div1" class="special-col" runat="server"/>
<div id="div2" class="special-col" runat="server"/>
</div>
<div class="special-row very-special-row">
<div id="div1" class="special-col" runat="server"/>
<div id="div2" class="special-col" runat="server"/>
</div>
I am hardcoding the layout, which is not how a template/layout should be used originally. Since i cannot add css class (and dont want to), the only way that i can think of is, create css file for each page, copy the code of all required class(s) and paste it inside an id selector eg:
Page1:
<div id="specialDiv" class="special-row">
<div id="div1" class="special-col" runat="server"/>
<div id="div2" class="special-col" runat="server"/>
</div>
page1.css:
#specialDiv{
// code of special-row
}
Page2:
<div id="specialDiv" class="special-row very-special-row">
<div id="div1" class="special-col" runat="server"/>
<div id="div2" class="special-col" runat="server"/>
</div>
page2.css:
#specialDiv{
// code of special-row
// code of very-special-row
}
Also note, i cannot make special-row a dnn container. Is there a way such that I can apply css to parent div/section ?