Neocities.org

AllyRat World

allyratworld.com

1,811,379 views
665 followers
13,388 updates
0 tips
AY anyone know how to make an element hidden on mobile? I want the personal site button on my idex page to disappear on mobile (bc personal site does not work on mobile xP) and currently im using display:none; but its not working on mobile??? but it works if u shrink ur pc browser??
1 like
ocean-waves 3 years ago

I think >> @media only screen and (max-width: X) { .div { display: block;} } << could work, where X is the max width of a mobile display (I think 768px works well?) should be good.

1 like
flowerbasket 3 years ago

maybe try visibility:hidden in addition to the display:none? thats what worked for doing the same thing on one of my sites

2 likes
irony-machine 3 years ago

You need to add the meta tag to your head: https://developer.mozilla.org/en-US/docs/Mozilla/Mobile/Viewport_meta_tag (I can't post it here, it gets scrubbed from the comment, sorry ._.)

2 likes
irony-machine 3 years ago

Also apologies if you got 20000 notifications from me deleting and writing the same comment

1 like
allyratworld 3 years ago

it's working!! Thankyou all so much

Website Stats

Last updated 9 hours ago
CreatedJun 4, 2019
Site Traffic Stats

Tags

art kawaii anime lolita