Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

timmillwood

macrumors 6502a
Original poster
Apr 7, 2006
955
1
I want to make a website which has a div container that is 16:9 format. That bit is easy, but i want it to change size to fit different screen resolutions while still keeping the 16:9 format.

anyone know how to do it?
 
I'm not sure what you're actually asking. You can specify the width of various elements, but the height usually scales to fit the content. Don't assume that the content will always fit in the same amount of space; the user's available fonts or settings can change the amount of text that fits in a particular area.
 
How big is the div?

The CSS of height and width are relative to the page. So it'll keep the 16:9 aspect, but you need to put in a baseline value for those values.

Another way you can do it is having it's height and width, while at the ratio, be inherit of the page. This is where I find Dreamweaver useful. I can modify the CSS file and test in the browser in less than minute.

Steve
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.