For a responsive template, I have a media query in my CSS:  @media screen and (max-width: 960px) {  body{  /*  something */  background:red;  } }   And, I made a jQuery function on resize to log width:  $(window).resize(function() {  console.log($(...
I'm having difficulty getting Respond's CDN/X-Domain Setup working.  I started off serving all assets from the CDN:  <link rel="stylesheet" href="http://cdn.example.com/css/main.css?2013012401"> <script src="http:...
I'm using css media queries on my website to switch to a more vertical layout on smaller devices. This works quite well, but I'd like to add a button on the site with something like "Show desktop version". I want to make this button (...
Can somebody help me modify the below code to display image only in mobile view. Right now, it is always visible.  <style type="text/javascript">       .icon-xyz       {float: left; width: 22px;cursor: pointer;background: none;}...
I'm looking for a reliable way to get the width of the window in em units using javascript. I was surprised to see that jQuery will only return a result in pixel measurements. Any help is appreciated....
I am allowing my users to print but the output is way too large (I have to manually adjust to about 60% in the print dialog). I use a css media query (below) to control the content and have tried changing the font-size of the html, body{}without any...
I find the following JS solution to having text resize based on viewport size quite elegant:  https://stackoverflow.com/a/10295733/1318135  onresize=onload=function(){document.body.style.fontSize=window.innerWidth+"px"}   However, there are 2...
The project I am working on consists of a grid showing content. I would like to resize each item on the grid to a fourth of the viewport's size. This would be very easy with Javascript, but there is some backend stuff that needs to be aware of th...
EXPLANATION: A customer of mine wants to have a background video running on his responsive website. However he would also like to remove it for tablet/mobile users. I know this can be done with media queries, but the video would still load as part of...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.