Remove Width and Height attributes for all images

Permalink
Hi

I hope someone can help me.

I am currently building a website using Twitter Bootstrap and I am hoping in the future to make it responsive if the client decides to do this however I have noticed all my images on the site have 'width' and 'height' sizes on them, i.e

<img src="/PADI-ScubaCourses-HomeTab.jpg" width="208" height="139" alt="PADI Scuba Courses">

to be changed to:
<img src="/PADI-ScubaCourses-HomeTab.jpg" alt="PADI Scuba Courses">

How can I remove this from ALL the images on the site so the responsive feature works?

moonshark
 
Steevb replied on at Permalink Reply
Steevb
Removing 'height' and 'width' will give validation errors.

Leave image dimensions in place and use CSS to adjust images.

Try this in your CSS:
img{max-width:100%;height:auto}