Search
 
SCRIPT & CODE EXAMPLE
 

HTML

html display only on desktop

<#-- 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 :: button center bootstrap 
Html :: bootstrap 4 center div 
Html :: upload icon font awesome 
Html :: favicon in html document 
Html :: google web fonts open sans 
Html :: vertical break html 
Html :: bootstrap 5 align middle 
Html :: link to send email with subject 
Html :: how to add a browser tab icon 
Html :: tailwind css textarea 
Html :: free ebooks 
Html :: html lowercase 
Html :: plural of axis 
Html :: tailwind css background image 
Html :: hyperlink html 
Html :: html lazy loading images 
Html :: add fav icon to browser tab html 
Html :: dutch phone pattern html 
Html :: text color html 
Html :: href new window html 
Html :: django template tags background-image 
Html :: html first line indent 
Html :: axonivy reuseable component 
Html :: how to send html file with express 
Html :: html telephone 
Html :: html if en change to ltr 
Html :: at html 
Html :: HOW TO USE A video on a html website from youtube 
Html :: textarea autosize angular 
Html :: bootstrap 5 modal 
ADD CONTENT
Topic
Content
Source link
Name
3+3 =