function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Anthony PicaAnthony Pica 

How to apply an ID or class to an HTML element contained in a content block

How would I add an ID or class to an html element that is inside a content block?

 

Take this structure for example:

 

<div> (panel)

<div> (content block)

<a></a> (html element)

</div>

</div>

 

I can add an ID or class to the content block via the Style tab in Site.com, but I am not able to add an ID or class to the <a> element. I can go into the editor and apply *some* inline styling such as size and color, but I can't add an ID or class to it. I know I can apply CSS via a stylesheet with specificity (ie. div div a { text-underline: none; }) but I want to be able to add an ID to the element.

 

Any idea how this can be achieved without a custom code block? I don't see an option for adding a class or ID in the editor.

Ryan-GuestRyan-Guest

I believe the only way to do this is to use the "Edit HTML" option (when you right click on the content block).

 

 

laura.mckevitt@bakertilly.comlaura.mckevitt@bakertilly.com

 

Hello,

 

Click on "Edit HTML" from the Gear icon to the right of the Content block. Within the editor,do something like:

 

<a id="InsertID" href="http://www.salesforce.com/">Salesforce.com</a>

 

/LM