AEM moves div tag - how to fix? | Community
Skip to main content
New Participant
May 14, 2018 7:22 PM UTC
Solved

AEM moves div tag - how to fix?

I have an AEM component with the following structure:

<div A>

    <div B>

         <div C />

    </div B>

    <div D>

         <div E />

    </div D>

</div A>

However, it shows in my AEM pages with this structure:

<div A>

    <div B>

         <div C />

    </div B>

</div A>

<div D>

    <div E />

</div D>

What is causing this, and how do I fix it?  Thanks!

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
arunpatidar
arunpatidarAccepted solution
New Participant
May 15, 2018 1:13 PM UTC

Could you please share your component code, may be issue with HTML structure.

I tried same in 6.3, working fine for me.

Thanks

Arun

Arun Patidar

5 replies

kautuk_sahni
Employee
May 16, 2018 1:32 PM UTC

Can you please share with us the package to debug this?

I have also checked and it is working fine for me on AEM 6.3 and 6.4.

-Kautuk

Translate
Kautuk Sahni
smacdonald2008
Level 10
May 15, 2018 1:23 PM UTC

I agree with Arun - i have developed many AEM components that include nested DIVS and never seen this happen.

Translate
arunpatidar
arunpatidarAccepted solution
New Participant
May 15, 2018 1:13 PM UTC

Could you please share your component code, may be issue with HTML structure.

I tried same in 6.3, working fine for me.

Thanks

Arun

Translate
Arun Patidar
PSDuckieAuthor
New Participant
May 15, 2018 12:09 PM UTC

I tried putting the cq:noDecoration="true" tag in the component that is giving me the trouble, but to no avail.  Am I doing this correctly?

Translate
smacdonald2008
Level 10
May 14, 2018 7:29 PM UTC

The only time i know of why AEM modifies DIVs of a component is related to eidting the component as discussed here -- https://aemcorner.com/aem-how-to-remove-div-wrapper-from-component/

Translate