Active
Project:
AdaptiveTheme
Version:
7.x-3.0
Component:
CSS/HTML
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
2 Sep 2012 at 00:35 UTC
Updated:
5 Jan 2013 at 19:29 UTC
I uploaded my logo in place of the Drupal icon, no site name, and it doesn't decrease in size when viewing on iPhone. The width is 200px, so it fits in the window of the iPhone but it's really big! I want it to be responsive and decrease in size. Is this not built into the theme?
Comments
Comment #1
Jeff Burnz commentedYes it is, but its always relative to its containing element size - which is the header, which is 100%. The default CSS for all images is max-width: 100%, so the image will always try to scale to its maximum dimensions, in your case 200px wide - and as you found out when the screen is more than 200px the image will be it's normal full size.
The way to get the logo to scale is to write some CSS for it, and place it in the responsive stylesheets. For example you might use the responsive.custom.css file and something like this:
Comment #2
kingfisher64 commentedI don't know what you're vision for at is Jeff, but bundling a responsive image module the same way you've done with fontyourface to handle these kind of things might not be a bad idea for the future. Again as an unchecked extra option.
http://drupal.org/project/ais is great, I use this, but it requires htaccess rewrite though
http://drupal.org/project/cs_adaptive_image
http://drupal.org/project/resp_img - heard v good things about this, not had chance to fully investigate
http://drupal.org/project/cs_adaptive_image
So many possibilities.
Comment #3
Jeff Burnz commentedYeah, many possibilities however they are all (last time I looked seriously) in a state of development and heavy flux, so its really hard to nail down something that's not a 100mph moving target. Fontyourface is pretty settled and highly usable with an API I could rely on and hook into easily, these other modules I am not so sure.
For sure I will look again, they are very powerful and extremely useful, Attiks http://drupal.org/project/resp_img module probably has the most heavy development and is pretty easy to use, this guy is a machine coder and does great things.
Comment #4
mengi commentedLooks like there is a successor to resp_img, which is picture, which even has a upgrade path to Drupal 8.