Hi 🙂
Please, try adding the following to your child theme CSS or Customize > Additional CSS and see if that helps:
.so-widget-sow-image {
font-size: 0;
}
Hello,
Thank you for answer !
It works, but isn’t this kind of a hack ? I have the widget title displayed over the image on hover, and obviously setting font-size of the parent element to 0 hides it.
Actually I don’t understand why displaying the title causes this margin around the widget.
Hi, sorry I missed the text. Unfortunately, we don’t have much time to assist with custom development but do our best to help when able.
Try removing the rule I sent previously. Then add:
.so-widget-sow-image {
position: relative;
}
Finally, locate this rule: .collection-img .so-widget-sow-image .widget-title and change it from position: relative to position: absolute.
Andrew,
Fantastic, it works !
Could you please give a hint into what happens ?
I had to set the position of the image title to relative because I use a css trick to overlay the image title over the image on mouse hover :
.collection-img .so-widget-sow-image .widget-title {
position: relative;
transform: translateY(-300px);
If position is set to absolute, then the title spanned the whole page.
Now setting the parent div position to relative solve the problem, but I admit I have no clue why…
Many thanks for your help !!
-
This reply was modified 7 years, 8 months ago by
durocketuk.
Super, glad that helped. By making the parent container relative and the child absolute we’re positioning the child absolutely within the parent. So top: 0, for example, will be top of the container we just set to relative. We’re basically setting the boundaries for the absolute element to use. I’m sure there are much better explanations of this elsewhere. Perhaps that gives you a starting point 🙂
It does, thank you for the support !