Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Make element visible only for md sized devices

Tags:

according to https://vuetifyjs.com/en/layout/display you can hide for a specific device size or range going up or down. But how would you show a div only for md sized devices? hidden-lg-and-up hidden-sm-and-down doesn't seem to work. concatenating hidden-{x}-only also does not seem to work.

like image 379
Martin Avatar asked Apr 24 '18 04:04

Martin


People also ask

How do you control the visibility of an element?

Utilities for controlling the visibility of an element. Quick reference Use invisible to hide an element, but still maintain its place in the DOM, affecting the layout of other elements (compare with .hidden from the display documentation). Use visible to make an element visible.

How to display only on medium devices in CSS?

CSS class to hide on small and extra-small devices. Note that you can also inline by replacing d- -block with d- -inline-block .hidden-md-up to hide on medium, large and extra large devices. .hidden-md-down to hide on medium, small and extra-small devices To display only on medium devices, you can combine the two:

How to show elements only on a given interval of screen sizes?

To show an element only on a given interval of screen sizes you can combine one .d-*-none class with a .d-*-* class, for example .d-none .d-md-block .d-xl-none .d-xxl-none will hide the element for all screen sizes except on medium and large devices. Change the display value of elements when printing with our print display utility classes.

How to hide element based on screen size in Bootstrap 4?

Bootstrap 4 Hide Element Based On Screen Size. .hidden-* class (Bootstrap 4 Alpha) and .visible-* (Bootstrap 3) is removed. You need to use display property, mainly d-*-none (hide) and d-*-block or d-*-inline-block (show). If you want an element to hide on size sm and below, but visible on md, lg and xl, use d-none d-md-block.


2 Answers

Classes should work class="hidden-lg-and-up hidden-sm-and-down"

Or you could use v-show="$vuetify.breakpoint.md"

Example

like image 62
Traxo Avatar answered Sep 20 '22 20:09

Traxo


This also should work:

class="d-none d-md-flex d-lg-none" 

Source.

like image 39
Billal Begueradj Avatar answered Sep 22 '22 20:09

Billal Begueradj