Support Forum

Please note that this forum is only available to you in read only mode. In order to contribute to this conversation you will need to renew your subscription.

Image class via Zentools2

zentoolsIf you use Zentools please post a review at the Joomla! Extensions Directory.

Hi

Is it possible to apply an image class via zentools2?

We have created a simple border style (outline: 1px solid #555;) and just wanted it to apply to the images on certain landing pages created using zentools2 layout (lightbox is not used on these pages - the images just link to other web pages).

The reason we used 'outline' instead of 'border' is that the border rule seemed to squash the images and make them blurry. By using 'outline' this did not happen as it is apparently not applied directly to the image but rather around it.

Thanks

Brian
  • Brian's Avatar
  • Brian
  • 12 Month Developer
  • 40 posts
  • 10 Thanks
  • Karma: 1
The administrator has disabled public write access.
Hi Brian,

You could use the Module Class Suffix in the advanced tab

Then use that as the basis to target the image

or alternatively use the unique module id that each module has and use that

Cheers
  • manh's Avatar
  • manh
  • Moderator
  • 45248 posts
  • 2106 Thanks
  • Karma: 603
The administrator has disabled public write access.
For the class suffix


class-suffix.jpg




test_2016-05-25.jpg




class-suffix-test.jpg
  • manh's Avatar
  • manh
  • Moderator
  • 45248 posts
  • 2106 Thanks
  • Karma: 603
The administrator has disabled public write access.
For the individual module id you can either use the ID from the module manager together with zentools-

or I just view the source code and take it from there
  • manh's Avatar
  • manh
  • Moderator
  • 45248 posts
  • 2106 Thanks
  • Karma: 603
The administrator has disabled public write access.
zentools2-class.jpg


and use this
  • manh's Avatar
  • manh
  • Moderator
  • 45248 posts
  • 2106 Thanks
  • Karma: 603
The administrator has disabled public write access.
Hi Paul

I managed to get your first suggestion to work - by adding a Module Class Suffix. I didn't add a leading space but it seemed to work okay without. I had to add !important to the corresponding custom.css rule to ensure it kicked in ok.

Another method that seemed to work was targeting the .zt-image.zt-border img classes via the custom.css file but that would presumably target all instances which is not ideal.

It also worked by adding a class in custom.css file and surrounding the {loadposition modulenamehere} in a corresponding class div but that is more work than the first method above.

One mistake I made was to forget to put a closing } for the custom.css rule. Consequently none of the rules, at least below that particular unclosed rule, worked. Took me half an hour to work out why the website looked a bit strange. If it's not one thing it's another with websites.

Thanks for your help

Brian
  • Brian's Avatar
  • Brian
  • 12 Month Developer
  • 40 posts
  • 10 Thanks
  • Karma: 1
The administrator has disabled public write access.
Missed closing brackets are a right pain :(

I tend to use the module ids myself but depends on the situation or if its for a specific page sometimes I use the itemid class from the source code

Cheers
Paul
  • manh's Avatar
  • manh
  • Moderator
  • 45248 posts
  • 2106 Thanks
  • Karma: 603
The administrator has disabled public write access.
The following user(s) said Thank You: Brian

zentoolsIf you use Zentools please post a review at the Joomla! Extensions Directory.

Happy Campers