Alvin Novian
Back to index

CSS Odd Rules That You Should Implement

Consistent Image Size

Well of course you think you know it, “use height and width”, yes it is, but what happen when browser couldn’t load the image and use alt text instead?

using display block could fix the issue, therefore I think it’s a mandatory to use display block all over img tag, at least for me, I always want to control img size and don’t want to mess up with it

reference: https://stackoverflow.com/questions/47461916/img-size-when-displaying-alt-text