Quantcast
Channel: User Brett Merrifield - Stack Overflow
Viewing all articles
Browse latest Browse all 37

Hide div element when screen size is smaller than a specific size

$
0
0

I have a div element that I want to hide when the width of the browser is less than or equal to 1026px. Is this possible to do with the css: @media only screen and (min-width: 1140px) {} If it isn't possible with css, Is there any alternative?

Extra info:When the div element is hidden, I don't want a blank white gap. I'd like the page to flow as it would if I deleted the div element entirely from the code.

The div I am hiding is <div id="fadeshow1"></div>.

HTML5 Doctype.

I used javascript to place a gallery into that div.


I want it to look like this when it is bigger than 1026px width:https://i.sstatic.net/REBPi.png


I want it to look like this when it is less than 1026px width:https://i.sstatic.net/XdiL4.png


Viewing all articles
Browse latest Browse all 37

Trending Articles