[[+content_image]]
K
K
knowledge2018-12-28 08:26:08
MODX
knowledge, 2018-12-28 08:26:08

How to make responsive design in fancybox gallery on modx?

It is necessary that when the browser window is reduced, the images are stretched to full width
Code
[[[email protected]?
&elementClass=`modSnippet`
&element=`Gallery`
&limit=`30`
&totalVar=`gallery.total`
&album= `About`
&containerTpl=`gallery-outer`
&thumbTpl=`gallery-thumb`
&thumbWidth=`190`
&thumbHeight=` 106`
&imageWidth=`900`
&imageHeight=`700`
]]
I remove the thumbWidth and thumbHeight values ​​so that the image dimensions are taken from the styles, but in this case the default values ​​are passed to the src of the image h=100 w=100
The link itself
href="[ [+image]]"
src="[[+thumbnail]]"

Answer the question

In order to leave comments, you need to log in

[[+comments_count]] answer(s)
M
maniiii, 2019-01-03
@maniiii

what about modx? You need to edit the css.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question