organicbmx 0 Report post Posted June 14, 2005 is it possible to use css to force all images to be width 400?i'm making a blog in an iframe and dont want to have to enter the html code in every time if it is possible to avoid.any ideas - possibly in html or another language not css.thanks Share this post Link to post Share on other sites
sxyloverboy 0 Report post Posted June 14, 2005 i dunno but try this. img {width: 400px;} Share this post Link to post Share on other sites
overture 0 Report post Posted June 14, 2005 yes that is correct sxyloverboy. But may i say that making ALL images 400px in width is not a good idea. You should only apply it to images bigger in width than 400px to shrink them down.Do this: img.Resize { width: 400px;} now when you insert and image on your site add this code to the image if it is bigger than 400px in width:<img src="" width="" height="" class="Resize" /> You see i have added this: class="Resize" this refers to the class in the CSS file and it links it only to images so if you put it in any other tag it would not work.Remember only place the class on images bigger than 400px in width. Leave the images that are smaller than 400px in width alone so they do not get distorted as there is on reason to resize them really.Good luck Share this post Link to post Share on other sites
rodneylay 0 Report post Posted August 9, 2005 is it possible to use css to force all images to be width 400? The only problem with the suggestions is that images smaller than 400 pixels will not take up enough space on the web page if you are trying to get a uniform look and feel. Use the CSS examples given and then just make sure that the images for the site are 400 pixels or greater. There is no sure fire cure all solution to most web design problems. At some point someone has to set standards for web content to insure a uniform display. The best way is on the image creation side of the question. If you cannot control that, then you just have to deal with the problems created. I wish there was a killer solution to things like this, but most of the time it comes down to contolling the human side of the equation. Rodney Lay Share this post Link to post Share on other sites