Html + css configure wordpress themes to hide the sidebar when the screen is small

Source: Internet
Author: User
The title is long. For a responsive web site, many functions are implemented through @ media queries and Viewports. This site is now using the wordpress responsive theme of html5. Of course, there will also be js to implement Responsive, but I didn't know this knowledge, so I dare not describe it.
This topic has been used for some time. During small screen access, I always saw the wordpress page sidebar loaded and wanted to discard it. Some time ago I saw a few theme style.css files in @ media queries. It is found that this can be changed.
The following is the topic section @ media configuration:
Originally set:
 
The code is as follows: Copy code
@ Media screen and (max-width: 768px) {# content, # sidebar {float: left; padding: 2%; width: 96%; display: none ;}}
 
The following is the prohibition effect through this method:
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.