Top "Aspect-ratio" questions

The aspect ratio of an element describes the proportional relationship between its width and its height.

CSS force image resize and keep aspect ratio

I am working with images, and I ran across a problem with aspect ratios. <img src="big_image.jpg" …

css image aspect-ratio
Maintain the aspect ratio of a div with CSS

I want to create a div that can change its width/height as the window's width changes. Are there any …

html css responsive-design aspect-ratio
How to style a div to be a responsive square?

I want my div to adapt its height to always equal its width. The width is percental. When the parent's …

css layout responsive-design aspect-ratio
Grid of responsive squares

I'm wondering how I would go about creating a layout with responsive squares. Each square would have vertically and horizontally …

html css responsive-design grid-layout aspect-ratio
Resize UIImage by keeping Aspect ratio and width

I seen in many posts for resizing the image by keeping aspect ratio. These functions uses the fixed points(Width …

iphone objective-c ios aspect-ratio fixed-width
Is there a list of screen resolutions for all Android based phones and tablets?

If not, is there a list of screen resolutions for the most popular Android phones and tablets.

android screen-resolution aspect-ratio
Android Camera Preview Stretched

I've been working on making my custom camera activity on Android, but when rotating the camera, the aspect ratio of …

android android-camera surfaceview preview aspect-ratio
Maintain aspect ratio of div but fill screen width and height in CSS?

I have a site to put together that has a fixed aspect ratio of approximately 16:9 landscape, like a video. I …

html css responsive-design aspect-ratio
What's the algorithm to calculate aspect ratio?

I plan to use it with JavaScript to crop an image to fit the entire window. Edit: I'll be using …

javascript algorithm crop aspect-ratio
How to scale SVG image to fill browser window?

This seems like it ought to be easy, but I'm just not getting something. I want to make an HTML …

layout xhtml svg scaling aspect-ratio