Andrew Nevins
(@anevins)
WCLDN 2018 Contributor | Volunteer support
What do you mean by not responsive?
When I use it on a mobile phone or a tablet it turns out really different. The sidebar box ends up in the middle of the screen and overlaps the page.
Andrew Nevins
(@anevins)
WCLDN 2018 Contributor | Volunteer support
Are you sure you just added a border?
Yes, because when I undo it, it will respond well on a tablet.
Andrew Nevins
(@anevins)
WCLDN 2018 Contributor | Volunteer support
But you have a Custom CSS style giving the sidebar a left margin of -322 pixels
Someone gave me this code to put a border around my sidebar.
What should my margin say?
Thanks for your help!
Andrew Nevins
(@anevins)
WCLDN 2018 Contributor | Volunteer support
Did you explain to that someone that the website was responsive when you asked how to add a border to it? That’s the wrong code for a responsive website.
Use this instead:
@media screen and (min-width: 960px) {
.site-sidebar {
width: 278px;
padding: 10px;
border: 1px solid black;
}
}
Thank you so much, this worked!