resizing images

digimarx

New Member
How do you get images to be resized to fit within the properties of the div tags

I have used ID tags using CSS to a specific size, but for some reason it isn't fitting correctly
 

digimarx

New Member
This is the sample code in CSS

#thumbImg {
height: 171px;
width: 256px;
}

When I put a larger image than that, the image always is bigger, and I have to constantly photoshop it to make it that size
 

digimarx

New Member
Weird, I have just tried it with another image, and it has done exactly what I wanted....

Twilight zone time
 

LandisCreations

New Member
While this does work, I highly recommend resizing the image yourself rather than relying on the browser to resize images, for two reasons:

1) Browsers are generally really bad at it. At the very least, they're unreliable when it comes to maintaining a quality image.

2) You're wasting data transfer and increasing page load times. Why use a 2MB image that's 1000px x 800px resized for a 100x80 space when you could resize it to a 10kb image that's 100x80. (Extreme example, but I imagine you get the point.)

Just resize the image ahead of time and you'll come out with better images, smaller pages, and faster load times.
 
Top