Reputation: 89
Very simply put I want to display a html table, when the window is larger than 900px, or so. How would I do so?
Upvotes: 0
Views: 55
Reputation: 888185
You're looking for CSS media queries.
You can use a media query to hide the element on smaller viewports.
Upvotes: 6
Reputation: 4934
Two options, Media queries or javascript.
Media Query:
@media screen and (max-device-width: 900px) { ... }
Put your specific code to show it in that file.
Javascript:
if(document.width >= 900){ /*display content*/ }
In the JS case, you may need to attach an event listener for a window resize.
Upvotes: 2