Archived topic
Adjust start height of footer widget #2
5 replies · Started by Ola on December 29, 2020
Is it possible to adjust vertical start of footer widget #2?
In footer widget #1 I have a title ("Contact info") with address below.
In footer widget #2 I have telephone no and email (no title)
Both are using custom html blocks
I would like to align content (address line 1) in footer widget #1 with tel no in footer widget #2, but as the latter has no title it is a bit of a problem.
I can add line breaks in widget #2, but this will create a large gap when viewing on mobile. Are there any other options?
View https://www.stag1.ikigai.se/ for illustration
Best regards,
/Ola
Hi there,
you can add some Top margin to the top of the first widget in footer widget #2 like so:
.footer-widget-2 .widget:first-child {
margin-top: 51px;
}
Thanks! Unfortunately the margin follows the widget when it folds under widget#1 in mobile view, also creating a gap.
Would it be possible to add a widget in widget2 (above, custom html containing linebreaks) that would not be shown on mobile view? How to make that specific instance conditional?
Best regards,
/O
Hi Ola,
We could use a media query to not show the margin on mobile view.
@media (min-width: 769px) {
.footer-widget-2 .widget:first-child {
margin-top: 51px;
}
}
Let me know if it works.
Brilliant!
Exactly what I was looking for!
Thanks!
No problem!
Glad to help :)