html - width:auto overwrite inline width of image -


a client asked me problem having on wp site. when adding external image post, original size of 800x640. can resize image via wordpress wysiwyg editor to, 400x320. html part when inspecing element firebug on front end or in text tab of editor:

<img class="" src="http://xxx.nl/images/externalimage.jpg" alt="" width="400" height="320" /> 

but on front end image shown @ original 800x640 size. when inspecting element firebug shows:

img {     height: auto;     max-width: 100%;     vertical-align: top;     width: auto; } 

if disable 'width' line in firebug image resizes 400x320.

how can resolve issue, client can thing images in editor.

i can solve myself on individual case basis adding width containing span/p tag, client doesn't know css or html , can't manually edit widths of containing tags every time posts new.

the images inside 'post' wrap container, has own class. apart auto, set 'inherit' yields same result auto. (i guess inherit -> auto img {})

i don't know i'm doing wrong here, seems quite easy question.


Comments

Popular posts from this blog

php - Permission denied. Laravel linux server -

google bigquery - Delta between query execution time and Java query call to finish -

python - Pandas two dataframes multiplication? -