Jump to content
xisto Community
Sign in to follow this  
organicbmx

Css Help is this possible?

Recommended Posts

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

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

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.