sheelsc Posted December 22, 2016 Share Posted December 22, 2016 I would like to remove the sidebar from this css template below. In this template the side menu is visible on larger screens. I want this sidebar to be accessible only from the hamburger menu icon on all screen sizes. Can you explain how to do this in the code. http://www.w3schools.com/w3css/tryw3css_templates_analytics.htm# Thanks Link to comment Share on other sites More sharing options...
dsonesuk Posted December 22, 2016 Share Posted December 22, 2016 Remove 'w3-collapse' class from nav element and replace with ' w3-hide-large' class, then remove 'margin-left:300px;' from w3-main div element. 1 Link to comment Share on other sites More sharing options...
sheelsc Posted January 3, 2017 Author Share Posted January 3, 2017 Thank you for the feedback. Following your instructions It has removed the menu from this screen but now there is no access to the side menu as the hamburger icon is only available in the smaller screen sizes. Link to comment Share on other sites More sharing options...
dsonesuk Posted January 3, 2017 Share Posted January 3, 2017 Remove 'w3-hide-large' from button, so it should be <button onclick="w3_open();" class="w3-btn w3-padding-0 w3-hover-text-grey"><i class="fa fa-bars"></i> Menu</button> Remove the 'w3-hide-large' I previously asked you to add, and instead add display: none; to attribute style <nav id="mySidenav" style="z-index:3;width:300px; display: none" class="w3-sidenav w3-white w3-animate-left"> IT should work now. 1 Link to comment Share on other sites More sharing options...
sheelsc Posted January 3, 2017 Author Share Posted January 3, 2017 That worked perfectly Thank you!!! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now