user587702
user587702

Reputation: 11

Dynamic image scaling

Is dynamic imagescaling a CSS function or HTML code?

Upvotes: 1

Views: 662

Answers (2)

Einar Ólafsson
Einar Ólafsson

Reputation: 3177

Note sure what you mean, but you can use percentage instead of pixels, f.x. only using width the images will dynamically resize itself with its container and keep its aspect ratio.

So I would say your looking for a css styling to do what you want to do. But I need more info to understand what your trying to do.

Upvotes: 1

Sparafusile
Sparafusile

Reputation: 4956

You can use CSS to change the size of an image through JavaScript.

img.style.width = "123px";
img.style.height = "321px";

Upvotes: 1

Related Questions