Spot unsized images during development


/ Published in: CSS
Save to your folder(s)



Copy this code and paste it in your HTML
  1. Here’s a tip for catching unsized images during development. Add this CSS rule somewhere in your stylesheet:
  2.  
  3. img:not([width]):not([height]) {
  4. border: 2px solid red !important;
  5. }
  6. Then any images without width and height attributes will be drawn with a red border so they’re easy to spot.
  7.  
  8. Found via 37signals

URL: http://37signals.com/svn/posts/2979-css-tip-spot-unsized-images-during-development

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.