![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi! I have an image inside a DIV box with its dimensions specified. The problem is that I don't know the dimensions of the image beforehand, therefore the image grows outside the box if it's bigger than the box. Is there a way to force the image to resize itself automatically to fit the box with CSS ? |
#3
| |||
| |||
|
|
Hi! I have an image inside a DIV box with its dimensions specified. The problem is that I don't know the dimensions of the image beforehand, |
|
therefore the image grows outside the box if it's bigger than the box. |
|
Is there a way to force the image to resize itself automatically to fit the box with CSS ? |
#4
| |||
| |||
|
|
Hi! I have an image inside a DIV box with its dimensions specified. The problem is that I don't know the dimensions of the image beforehand, therefore the image grows outside the box if it's bigger than the box. Is there a way to force the image to resize itself automatically to fit the box with CSS ? Thanks in advance |
#5
| |||
| |||
|
|
I have an image inside a DIV box with its dimensions specified. The problem is that I don't know the dimensions of the image beforehand, therefore the image grows outside the box if it's bigger than the box. Is there a way to force the image to resize itself automatically to fit the box with CSS ? |
#6
| |||
| |||
|
|
"Abs" wrote in comp.infosystems.www.authoring.stylesheets: I have an image inside a DIV box with its dimensions specified. The problem is that I don't know the dimensions of the image beforehand, therefore the image grows outside the box if it's bigger than the box. Is there a way to force the image to resize itself automatically to fit the box with CSS ? Why not resize the box to fit the image? Why make people download a big image only to see a small one? |
#7
| |||
| |||
|
|
Stan Brown wrote: "Abs" wrote in comp.infosystems.www.authoring.stylesheets: I have an image inside a DIV box with its dimensions specified. The problem is that I don't know the dimensions of the image beforehand, therefore the image grows outside the box if it's bigger than the box. Is there a way to force the image to resize itself automatically to fit the box with CSS ? Why not resize the box to fit the image? Why make people download a big image only to see a small one? Because I need the page (and the images) to be proportional to the screen resolution, that's why use percent units to set the box dimensions and position. Anyways, it seems it cannot be done, but I still don't understand this css behaviour, not resizing the content to fit the dimensions of its enclosing box. |
#8
| |||
| |||
|
|
In message <30p62hF31uoeuU1 (AT) uni-berlin (DOT) de>, Abs <abs2 (AT) yahoo (DOT) com> writes Hi! I have an image inside a DIV box with its dimensions specified. The problem is that I don't know the dimensions of the image beforehand, therefore the image grows outside the box if it's bigger than the box. Is there a way to force the image to resize itself automatically to fit the box with CSS ? Thanks in advance If you have set the size (width, height) of the containing div, then set the width of the image to 100%. The image will then be resized by the browser to fill the container. However, the results of image resizing only looks acceptable if the image is resized downwards. i.e. not presented in a container bigger than the physical size of the image. regards. |
#9
| |||
| |||
|
|
Why not resize the box to fit the image? Why make people download a big image only to see a small one? Because I need the page (and the images) to be proportional to the screen resolution, |
|
that's why use percent units to set the box dimensions and position. |
![]() |
| Thread Tools | |
| Display Modes | |
| |