Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Respond.js provides responsive web designs in browsers that don't support CSS3 Media Queries - in particular, Internet Explorer 8 and under.
Comment | File | Size | Author |
---|---|---|---|
#28 | Screenshot 2013-01-09 at 9.57.42 AM.png | 154.71 KB | finedesign |
Comments
Comment #1
pixelsweatshop CreditAttribution: pixelsweatshop commented+1
Comment #2
colin_young CreditAttribution: colin_young commentedHas anyone succeeded in getting respond.js to work at all with Omega? I've tried adding it via the info file, but it doesn't appear to be working (I've turned on CSS caching to get the CSS included via links rather than @import which is required in order for respond.js to work at all).
Thanks.
Colin
Comment #3
pixelsweatshop CreditAttribution: pixelsweatshop commentedPlacing it in the .info file of a theme causes Drupal to aggregate it with other JS files, which should never happen.
Try using http://drupal.org/project/respondjs
This module takes the guesswork out of placement, and helps standardize how Drupal sites are using respond.js.
Comment #4
colin_young CreditAttribution: colin_young commentedNice. Thanks. I was beginning to wonder how I was going to untangle it from the aggregated scripts and whether or not it was being loaded in the correct order :)
Have you managed to actually get respond.js to make Omega work in IE though? I'm seeing it being loaded, but the layout is not responsive at all. My understanding is that it just enables the min/max width media queries in IE, and that that is how Omega is implementing the responsive layout, so I'd expect it to "just work" once it's being included in the right place.
Comment #5
pixelsweatshop CreditAttribution: pixelsweatshop commentedI have not tested yet as the respond.js module only just got a full release the other day (was a sandbox project for the last few months). I will be doing some testing in a few days and will report back
Comment #6
colin_young CreditAttribution: colin_young commentedLet me know how I can help (other than posting "it's not working for me").
Comment #7
tancI'm also trying to get this working and having no joy. I've tried loading both respondjs and css3-mediaqueries.js, both with the same result which is no change in IE8. Any ideas?
Comment #8
pixelsweatshop CreditAttribution: pixelsweatshop commentedCore CSS aggregation needs to be turned on for respond.js to work.
Also looks like http://drupal.org/project/modernizr includes respond.js as well, along with some other goodies to help HTML5 and CSS3
Comment #9
Lloyd CreditAttribution: Lloyd commentedI've installed the Respondjs module and enabled CSS aggregation. Unfortunately the site is still rendering at a fixed width in IE8. Anybody have any tricks yet on getting this to work? I haven't tried Modernizr yet.
Comment #10
colin_young CreditAttribution: colin_young commentedI've tried both the Respond module and the Modernizr module, and no joy in IE8 (and, I'm assuming, IE7 or 6). Unfortunately, MS keeps promising to force the latest IE on users, but so far it hasn't happened (and since it requires Windows Updates to be enabled, in my experience the sort of people who are still using relics like IE are exactly the sort who don't have automatic updates enabled). I'm not holding my breath that the IE problem is going to go away any time soon.
Comment #11
jseffel CreditAttribution: jseffel commentedDoes anyone know what the problem is?
Comment #12
zipymonkey CreditAttribution: zipymonkey commentedCheck out http://drupal.org/node/1388898. It looks like the IE specific CSS file(s) are preventing the respond.js file to not work. I removed the IE specific stylesheets and changed ['browsers']['IE'] from gte IE 9 to TRUE. This seems to work for me. I added the following code to my omega subthemes template.php file.
Comment #13
pamatt CreditAttribution: pamatt commentedI could only get my Omega subtheme (www.comicout.com) to work with IE - including IE9 - by enabling BOTH responjds and modernizr modules AND implementing zipymonkey's hack (#12). Thank to you all folks!
Comment #14
tsavory CreditAttribution: tsavory commentedhmm Respond and modernizr installed enabled CSS aggregated all IE conditional calls pulled from the html.tpl.php and zipymonkeys caode added to the template.php cache flushed five times and still no responsive IE 8 :( any ideas what I missed?
Comment #15
altrugon CreditAttribution: altrugon commented+1 to kill IE8 and bellow.
Comment #16
apetrisor CreditAttribution: apetrisor commentedDirectly from the respond.js readme:
Unfortunately, that's exactly how Omega refrences CSS, so there you go :)
Comment #17
fubhy CreditAttribution: fubhy commentedThats wrong, sorry! @import is what Drupal outputs when not set to aggregate CSS (admin/system/performance). Once you configure your site to output aggregated CSS it won't use @import anymore.
Comment #18
apetrisor CreditAttribution: apetrisor commentedOh wow, I never knew that! I usually only aggregate before deployment, probably that's why. Never noticed the herd of @imports up until Omega. Was this in D6 as well?
Comment #19
stefvanlooveren CreditAttribution: stefvanlooveren commented#12 worked for me!
Comment #20
blueblot CreditAttribution: blueblot commented#12 also worked for me.
thx
blueblot
Comment #21
SebCorbin CreditAttribution: SebCorbin commented#12 worked indeed, but this should be configurable via a setting.
Comment #22
Pol#12 worked for me too. Thanks !
Comment #23
Argus CreditAttribution: Argus commentedok, so #12 seems to be working. There is a request to have this available in a setting.
Comment #24
Cyclodex CreditAttribution: Cyclodex commented#12 works fine! Thanks!
Comment #25
ruplBecause I've overlooked this so many times myself, there's an admin warning built into the respondjs module to warn you when you're running into this situation.
Comment #26
fubhy CreditAttribution: fubhy commentedThat's a good idea. I could add that here too. Thanks! :)
In Omega 4.x there is already a setting which allows you to rebuild the CSS aggregates on every page load... This does have quite a massive performance impact but allows you to easily debug CSS for IE including respond.js because it allows you to enable CSS aggregation without the hassle of having to clear caches everytime you change something.
Comment #27
fubhy CreditAttribution: fubhy commentedThat's done. Sorry for everyone stuck in 7.x-3.x land, I can't really fix it there without breaking existing sites. Settings this to fixed. http://drupalcode.org/project/omega.git/commit/c8f0a13
Comment #28
finedesign CreditAttribution: finedesign commentedI still can't get respond.js to work in Omega 3.x and IE8.
Could anyone share what settings you included in Modernizer? I'm attaching a screenshot of my settings.
For the template.php function, I need to replace "subtheme" with my subtheme name, correct?
This is all that I have in the template.php file:
I have emptied the cache repeatedly after every change.
Comment #29
stefvanlooveren CreditAttribution: stefvanlooveren commented#12 worked for me. Thanks