Archived topic
sidebar width
11 replies · Started by Stevie on September 30, 2020
Hi guys
I'm trying to get my sidebar widget image links ( 210px) to fill the sidebar
in mobile view.
Adjusting the width via sidebar layout in customiser works fine in desktop view
but the image widget does not fill the sidebar in mobile view.
is there a workaround to this?
Hi there,
can you share a link to your site so i can see the issue?
Thanks David
Try this CSS:
@media(max-width: 768px) {
.sidebar .widget img {
width: 100%;
}
}
tip top, seems to work.
I'm curious, in sidebar layout, there is no pixel width - just percentages.
How do I figure that out?
My container is 1200px.
Like the width of your sidebar in px?
If so this formula should work:
1200px (container width) * 20% (sidebar width %) = 240px.
cheers Leo.
No problem :)
Do I center the sidebar image by playing with the padding in mobile view?
It is nicely centered in desktop view with the default padding, but to the left of sidebar container in mobile view.
Give this CSS a shot:
@media (max-width: 768px) {
.separate-containers .inside-right-sidebar {
text-align: center;
}
}
cheers Leo
No problem :)