Quantcast
Channel: Adobe Community: Message List
Viewing all articles
Browse latest Browse all 80307

Re: How do I get fluid div height as % of width?

$
0
0

I realize that, however there is no such thing as an equation in css to give you a % of the width of an element for its own height. Maybe a javascript could do what you want, but I bet it's simpler than that.

 

Maybe looking at the page would give me a better idea that would do the trick. Could you post a link?

 

If the element is 100% of the viewport width, you could set its height as something like 12vw (12% of viewport width). That will work in any modern browser (IE8 and lower are out).


Viewing all articles
Browse latest Browse all 80307

Trending Articles