1

So I want to move sidebar to the top of the page and hide it behind hamburger menu. Just to make it exactly like when the screen is smaller (tablet, smartphone), despite resolution.

So I thought changing media query would be enough - it's not. Disappearing of a sidebar and showing hamburger menu starts at 955px and changing that value doesn't change anything so it has to be somewhere else. In functions.js (I'm learning js right now, so not everything is clear for me) there is a function resize() where 955 value shows up (3 times), but again, changing it doesn't do anything. I tried to solve it for days and I have a headache right now. Can anyone help mi with this, please?

0

Check out twentyfifteen/js/functions.js line 86

Try to play around with the values a bit - the code is pretty well documented.

Also don't forget to clear your browser cache when updating css/js files (just to be sure).

EDIT

Have you looked at style.css line 4097 Specifically this part:

@media screen and (min-width: 59.6875em) {

The .sidebar class is defined there, anything under 59.6875em doesn't style the sidebar at all.

You might want to consider changing the min-width value to something like 1080px (or whatever number you need).

Lmk if that does it.

  • That's the thing, I tried everything. I changed the values, as I stated on the beginning, cleared the cache - nothing. I'm working on local server, but put all changes live and still nothing. Behaves like it was something else. – Eleuth Nov 30 '17 at 13:22
  • Answer updated. – Daniel Fonda Nov 30 '17 at 14:22
  • It looks like You didn't read anything that I wrote. You are giving me advices even if I said that I've already tried all of this. Please, read it before write something, it's pretty short. – Eleuth Nov 30 '17 at 16:23
  • I told you what actually makes the sidebar either appear, or disappear, by investigating the css, js and html structure of the demo page of said theme. By adding the css for the sidebar element (which is wrapped in the aforementioned media query), to the sidebar element manually, it makes the sidebar reappear. The sidebar element does not just vanish from the DOM - it just looses its styling. Trust me, I've read your question multiple times and have investigated the issue thoroughly. As such I'm not saying you didn't see the code, I'm just telling you where to fix what you're looking to fix :) – Daniel Fonda Nov 30 '17 at 16:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.