• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 197
  • Last Modified:

Mobile web - making something not show up on a device

So assigning classes based on device - could you make something not show up at all on some devices.
0
burnedfaceless
Asked:
burnedfaceless
  • 2
  • 2
1 Solution
 
GaryCommented:
Not sure what you mean by So assigning classes based on device
If by devices you mean by type e.g. iphone, blackberry etc then no.
Media queries work based on device width - so if you want to hide something where the device width is 320px then you would use something like this.
@media all and (max-width:320px){
     #myelement-id  {display:none}
}

Open in new window

0
 
burnedfacelessAuthor Commented:
So the ID the hastag if you assigned that to paragraphs, pictures anything you could prevent it from showing on some devices?
0
 
burnedfacelessAuthor Commented:
Thanks
0
 
GaryCommented:
Yes
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now