How to Link a DIV?

In the CMS editor, it is technically not feasible to enclose <div> elements within <a> elements. Instead, you have the option to include specific attributes to the <div> elements:

  • data-widget-link-href
  • data-widget-link-target (optional)
  • data-widget-link-class (optional)

For example, setting in the editor these attributes in such way (please use the sidebar for this, there is no need for Source dialog here):

<div data-widget-link-href='http://example.com' data-widget-link-class='cls1' data-widget-link-target='_blank'>...</div>

will convert this <div> into a <a href><div> structure:

<a href='http://example.com' class='cls1' target='_blank'>
<div>...</div>
</a>

Building Relationships with Web Developers and Marketing Agencies that want better results

The world's fastest and most SEO friendly website code.