Search
 
SCRIPT & CODE EXAMPLE
 

HTML

css 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 :: confuse your browser in html 
Html :: js get mouse position canvas 
Html :: justify-content-between bootstrap 4 
Html :: twitter icon html5 
Html :: how do i set a pdf to be download link in html 
Html :: html get redirect to another page on load 
Html :: font awesome 5 cdn 
Html :: how to convert a html canvas into a png file 
Html :: auto update copyright year html 
Html :: html estrutura 
Html :: api whatsapp link 
Html :: make a basic html page 
Html :: html description tag 
Html :: open new tab when clicking link html 
Html :: html link tag 
Html :: ordered list with roman numerals html 
Html :: Add fav icon to browser tab 
Html :: video tag html 
Html :: checked bootstrap 5 
Html :: share to facebook html link 
Html :: fa fa file 
Html :: responsive html 
Html :: vue get data from slot template 
Html :: redo of healer season 3 
Html :: ol text align 
Html :: html h1 not show 
Html :: Call to a member function format() on string 
Html :: bootstrap 4 button with icon 
Html :: html5 astrix for absolutely required field inside a td tag 
Html :: how to set a gif as a background image of a page 
ADD CONTENT
Topic
Content
Source link
Name
1+5 =