Forum Moderators: open
I've recently become a convert to using css to create mostly table-less designs which are standards compliant (Jeff Zeldman changed my life! :-)
I'm always trying to find good ways to make my code clean, lean and mean. I was wondering if you all still specify widths and heights in the your image tags or if you prefer to leave them off.
It seems to me that there are a few arguments pro and con:
Pro:
- specifying dimensions makes it so the page doesn't shift around and adjust as it loads the images
Con:
- adds extra text to the code
- means you have to adjust these attributes every time you resize the image
I'd appreciate anyones thoughts on this...
-Damon
Actually, on a related note, is there a way (preferably in CSS) to add stuff like a fixed height or alt text to an image(s)? I'm thinking of something like
<img src="toolbara.png" class="class_that_puts_in_all_the_constant_stuff">
I've read all about the auto content generation, but never anything like this...