How to make a graphic image responsive in css -
i having difficulty getting graphic behave in responsive design.
the graphic in question main image below menu bar @ http://bit.ly/1wapylp
html
there no width attribute on graphic.
<div class="gc-responsive-div"> <img class="aligncenter size-full wp-image-28 gc-responsive-img" src="/wp-content/uploads/sites/8/2014/12/g_home.png" alt="gotham communications buttons graphic" /> </div> css (added last settings in cascade)
i trying force image max-width of 100%:
div.gc-responsive-div, img.gc-responsive-img { max-width: 100% !important; } my expectation
i want main image adjust viewport's size shrinking in responsive fashion width-wise & height-wise versus remaining @ graphic's natural height , width overflowing outside viewpoint. when view home page in large screen monitor, main graphic (natural width=663px , natural height=616px) appears designed. yet when @ home page on iphone main graphic appears in original natural width , height right of screen , 80% of graphic shows off screen , can't seen.
to me, responsive means graphic shrinks consume viewpoint , have aspect ratio adjust viewport.
i can't work. doing wrong here?
screen shots
large screen monitor (looks designed)

mobile device (graphic not resize)

thanks.
the html/css code seems fine. there fixed width set on one/more of container elements, find , add/change max-width too, or adjust in media queries if necessary.
also make sure have <meta name="viewport" content="width=device-width,initial-scale=1"> or similar responsive meta tags set.
Comments
Post a Comment