Search
 
SCRIPT & CODE EXAMPLE
 

HTML

html display only on mobile

<#-- Display only on destop and tablet -->
<div class="screenDisplay">
  <p>This is only displayed on desktop and tabled</p>
</div>
  
<#-- Display only on mobile -->
<div class="mobileDisplay">
  <p>This is only displayed if on mobile</p>
</div>
  
<#-- On the CSS file we use -->
  // ONLY FOR MOBILE
@media (max-width: 767px) {
	.screenDisplay{
		display:none
	}
}

// ONLY FOR DESKTOP AND TABLET
@media only screen and (min-width: 768px) {
  .mobileDisplay{
		display:none
	}
 }
Comment

PREVIOUS NEXT
Code Example
Html :: <noscript<p title="</noscript<img src=x onerror=alert(1)" 
Html :: bootstrap 5 justify content 
Html :: link to call a phone number 
Html :: html how to make text not bold 
Html :: adding mp4 in html 
Html :: how to change font size in html 
Html :: make text vertical align middle in table bootstrap 
Html :: a tag open in new tabn 
Html :: material icons cdn 
Html :: textarea placeholder 
Html :: free books 
Html :: html textarea 
Html :: pause html5 video jquery 
Html :: code to start text from right in html in arabic 
Html :: html link 
Html :: allow only positive integer in input type number 
Html :: include favicon html 
Html :: keywords html 
Html :: dont allow user to drag image css 
Html :: dynamic colspan in angular 
Html :: table all cells same width 
Html :: elementor icon controls 
Html :: bs4 no border 
Html :: send html file express 
Html :: how to fix a footer to the bottom of page css 
Html :: command button prevent / skip validation primefaces 
Html :: twig keys 
Html :: how to make bootstrap cards centered 
Html :: html form 
Html :: if else if vue 
ADD CONTENT
Topic
Content
Source link
Name
8+5 =