More in this section

Forums / General Discussions / How to nest divs using contentplaceholders

How to nest divs using contentplaceholders

2 posts, 1 answered
  1. Troy Lawrence
    Troy Lawrence avatar
    56 posts
    07 Jan 2010
    10 Feb 2010
    Link to this post
    I'm trying create a div nested inside of another div.   Each div has a contentplaceholder in it, but I can't get the div to display inside of the main div.   An example of what I'd like to do would be something easy like a header where there is a header div and inside of it is a logo div that I can position and move around.  I'm sure there's a way to do this in Sitefinity since it's standard practice when using divs and css. 

    sample code is below.  When I used this code it simply stacked the divs on top of each other in Sitefinity, but it did not allow me to access the parent div.

    <div id="content1"><asp:contentplaceholder id="Content1Background" runat="server" ><div class="content1Txt"><asp:contentplaceholder id="Content1Txt" runat="server" ></asp:contentplaceholder></div></asp:contentplaceholder></div>

    I've attached a simple screenshot of what I'm trying to achieve.
  2. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    01 Feb 2016
    11 Feb 2010
    Link to this post
    Hi Troy Lawrence,

    Thank you for using our services.

    You should apply positioning rules for your divs. For tutorials on this you should take a look at the following link: CSS Positioning. You can play around with the top, left and right css properties to achieve the desired positioning of each div box.

    Best wishes,
    Radoslav Georgiev
    the Telerik team

    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
    Follow the status of features or bugs in PITS and vote for them to affect their priority.
2 posts, 1 answered