Danny9's profile picture

Published by

published
updated

Category: Web, HTML, Tech

Adaptive Code for Mobile

This code will make profiles more viewable without too many elements being in the way!

(This is done by hiding them from smaller screens to get them out of the way from covering more important stuff, but will still be on your normal layout on desktop) 

 -->

1) In the code of the image you want to hide, name X anything you want

<img id="X" src="image link"/>


2) In the style code, add this code & name X like the last one  

<style>

@media (max-width:800px) { img#X 

{display: none;}

</style>

If you want to add more, repeat step 1 with different names for other images, & list them in step 2:

<style>

@media (max-width:800px) { img#X , img#Y, img#Z

{display: none;}

</style>


!!! This also works for frame embeds, & would be listed as "div#X"

<div id="X">
    <iframe src="URL">
</iframe>   
   </div>

And for text, list as "class#X"

<class id="X"> (Your text)


  


0 Kudos

Comments

Displaying 0 of 0 comments ( View all | Add Comment )