How to hide elements in mobile devices? CSS


Tags: css,wordpress

Problem :

I want to hide this sidebar in mobile devices, I tried this coding,

.sidebar__area:last-child .widget:last-child, .sidebar__area.is_stuck .widget:last-child{
display:none;
}

Which completely hid it.But when I try this, it doesn't work,

@media screen and (min-device-width: 100px) and (max-device-width: 950px{
sidebar__area:last-child .widget:last-child, .sidebar__area.is_stuck .widget:last-child{
    display:none;
    }


Solution :

Try this:

@media (min-width: 100px) and (max-width: 950px){
sidebar__area:last-child .widget:last-child, .sidebar__area.is_stuck .widget:last-child{
    display:none;
    }

    CSS Howto..

    how to select margin for a background image in CSS/CSS3?

    Animate Chartist on show

    How to add css to dynamically created tables

    CSS: How to create a background cutout using elements (not images)?

    How can I use JQuery to replace CSS background image and maintain gradient?

    how to give blur effect for css overflow visible content

    How to make css overlay hidden while having position as absolute

    How can i disable the bootstrap hover color for links

    What do i need and how do I start to adjust the css of a website with “encrypted” .gz files

    How to align with css

    How to change qunit theme / layout

    How can I remove comments on-fly from my static CSS files?

    How to resolve css incompabilities/differences between different versions of IE?

    How do I make a CSS sprite that controls multiple background images for multiple DIV's?

    How to extend the border-top on my nav_bar class

    How to vertically align inline-block divs without vertical spaces using CSS?

    DIV Background Image Doesn't Show in Firefox or Chrome (But only online). Online it works for IE?

    How to create a header that changes as you scroll down the page? [duplicate]

    How to flip which side a progress bar begins at with CSS

    How to add a table inside a div with its CSS working

    How to keep table headers fixed while scrolling down a table

    How to define specific CSS rules for IE9 alone?

    CSS: how to remove the top-gap for sub-menus?

    How to determine if width has px or %

    CSS Progress bar is out of place, how to keep it in place?

    jQuery - failed show/hide buttons

    how to write this code in right way in javascript

    Foundation 6: How to set .is-open-right translateX value with JavaScript

    How to add animated gif to an image sprite?

    Android How to load Custom CSS on external HTML page in WebView