I am using the Sitecore 9 default implementation of Dynamic Placeholders, and everything works fairly well. However, the one issue I've had is that the Dynamic Placeholders all overlap each other in the Experience Editor, making it very difficult to actually add content to these placeholders. Thus far I have been unable to find a cause for this.
My code is as follows:
On the main page:
@Html.Sitecore().DynamicPlaceholder("modules", 5)
On the module added to the first dynamic placeholder:
@Html.Sitecore().DynamicPlaceholder(new DynamicPlaceholderDefinition("cards")
{
Count = Model.CardCountPerRow,
OutputModifier = (input, context) => new HtmlString("<div class=\"" + Model.ColumnClass + "\">" + input + "</div>")
}
Has anyone else encountered this and is there a way to fix it?
Update: It appears that when I add different types of modules, they appear correctly. It is only when I try to add multiple instances of the same module type that they overlap each other.