css - How can i keep my image from enlarging the width of my page? -
when website breaks @ 800 pixels, photo on page moves above text correct, scales width of site, bad. how can make stop scaling up. want same size, 392 pixels wide. tried code below, doesn't seem work.
img { max-width: 392px !important; height: auto!important;}
now doing this, locking footer bottom. ugh.
option a
if want same size, change css this:
img { width: 392px; }
here's fiddle both original code , answer. http://jsfiddle.net/drydenlong/rs5f5/
update
option b
since cannot edit existing css, add following code, make sure loaded after existing css.
img { max-width: 392px; }
option c
or, if have access html recommend using inline styles this. below work.
<img src="..." style="max-width: 392px;">
Comments
Post a Comment