Responsive Web Design and display:none;
# March 12, 2013 at 6:32 pm
I can’t find a definitive answer to this subject, so I’m hoping someone here can steer me in the right direction.
I try to develop responsive web sites by rearranging content and not replacing content by hiding and appearing other content.
The goal is to avoid having extra HTML tags (but hidden) on the site when viewing on a mobile device.
Thanks in advance.# March 12, 2013 at 6:52 pm
The only way to serve different HTML tags based on view-port is to have some kind of server side device/view-port detection.
My rule of thumb is to hide as little as possible, especially with content (if it’s hidden does it really belong on the page?)
Let me start by saying I know that this is not good practice and still has tons of bugs, but as anyone here built a responsive site using PHP browser detection…
[http://php.net/manual/en/function.get-browser.php](http://php.net/manual/en/function.get-browser.php “PHP.NET Manual”)
echo $_SERVER . "nn";
$browser = get_browser(null, true);
combining this with some php ReqEx to display HTML content if so please link it.
You must be logged in to reply to this topic.