Register Advertise with usHelp Desk Today's Posts Search

Closed Thread
Thread Tools Search this Thread
Unread 1st Sep 2014, 07:57 PM   #1
HyperActive Warrior
 
Join Date: 2012
Posts: 422
Thanks: 213
Thanked 11 Times in 8 Posts
Default
Using media queries with display:none
Share on: 
fb share twitter share gplus share more share

Hi,

Is this a good / bad idea when working with websites?

Basically, suppose you have to display an image of a certain size. It looks great on a large screen but crappy on a smartphone.

So, what you do is change out the image (big one for a small one) with the media query as your "cue" so to speak as to which one to use.

I have seen this done with the "tap to call feature" - so - at with the large page, no button - but - at the mobile page, the button appears (allowing the user to call).

Also, I have seen it used when showing a "wait icon" - as part of AJAX replies.

Is it too much to expect for this to be used with forms (for example). Have one form be displayed and when getting to a mobile device, use a different form?

TIA
dgmufasa is offline  
Unread 14th Sep 2014, 11:28 AM   #2
WP Dev & Design
War Room Member
 
Join Date: 2011
Location: Earth
Posts: 787
Thanks: 92
Thanked 271 Times in 226 Posts
Blog Entries: 4
Default
Re: Using media queries with display:none
Share on: 
fb share twitter share gplus share more share

It's common, but a bad idea.
The content becomes "inaccessible" to screen readers.
Don't underestimate the importance of "Accessibility" in web development.
Take a look at this: Places It's Tempting To Use Display: None; But Don't | CSS-Tricks for a heads up regarding this.

A well coded responsive site will have no problem on mobile devices and can look different then on the desktop.
David V is offline  
Closed Thread


Bookmarks

Tags
displaynone, media, queries


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




All times are GMT -6. The time now is 11:38 PM.