New to AEM - why aren't my css classes being used? | Community
Skip to main content
robin_wilson1
Level 2
May 23, 2016
Solved

New to AEM - why aren't my css classes being used?

  • May 23, 2016
  • 3 replies
  • 935 views

I've been following the AEM 6.1 tutorial found here:

    https://docs.adobe.com/docs/en/aem/6-1/develop/the-basics/website.html

I'm running into a question that is puzzling to me. I create all the way through to making my own 'body.jsp' file, and add the stuff they recommend into it. But I notice that when I open the page (by double-clicking it from the AEM WCM tool) and my page pops up in the editor, it doesn't seem to include anything I personally add to the content (like a 'class="foo"' tag to a <div>, or even HTML comments like <!-- RDW TEST -->).

So my question is really sort of generic - how can I build a site where I have complete control over the css, javascript, and content? And then how do I retrofit the AEM editor functionality into that site?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by kautuk_sahni

Hi 

This is great the things are working now.

But for your reference, please have a look at these few reference Helpx articles in which we are creating component/Using Apis etc but also using CSS.

Link:- https://helpx.adobe.com/experience-manager/using/custom_columns.html

Link:- https://helpx.adobe.com/experience-manager/using/custom-carousel-components.html

Link:- https://helpx.adobe.com/experience-manager/using/custom-sling-servlets.html

 

Please have a look at the all articles list here:-

Link:- https://helpx.adobe.com/experience-manager/topics/how-to.html

 

I hope this would be useful for you.

Thanks and Regards

Kautuk Sahni

3 replies

robin_wilson1
Level 2
May 23, 2016

Nevermind, this appears to be only an artifact of the AEM page editor tool. If I remove the /editor.html/ from the URL and just look at the page directly - it shows up like I expect. This does beg a new question, but I'll put that in a new topic.

smacdonald2008
Level 10
May 23, 2016

To use JS files and CSS, tou need to use clientlibs. The JS and CSS files go into the clientlib.

kautuk_sahni
Community Manager
kautuk_sahniCommunity ManagerAccepted solution
Community Manager
May 24, 2016

Hi 

This is great the things are working now.

But for your reference, please have a look at these few reference Helpx articles in which we are creating component/Using Apis etc but also using CSS.

Link:- https://helpx.adobe.com/experience-manager/using/custom_columns.html

Link:- https://helpx.adobe.com/experience-manager/using/custom-carousel-components.html

Link:- https://helpx.adobe.com/experience-manager/using/custom-sling-servlets.html

 

Please have a look at the all articles list here:-

Link:- https://helpx.adobe.com/experience-manager/topics/how-to.html

 

I hope this would be useful for you.

Thanks and Regards

Kautuk Sahni

Kautuk Sahni