-1

I have a scrollable container div with the aspect ratio 16:9. Inside the div there is a lot of smaller divs. The smaller divs should be visible by 7 divs in width and 5 in height. Like this:

https://app.box.com/s/pbg3obc3k4lq6e4i2wdny32r1qlz5yv9

I want to keep the aspect ratio and number of inner divs visible constant, even though the windows is resized etc.

Traberg
  • 21
  • 3
  • 1
    possible duplicate of [Maintain aspect ratio when resizing a DIV using CSS](http://stackoverflow.com/questions/1495407/maintain-aspect-ratio-when-resizing-a-div-using-css) – dosek125 Apr 19 '15 at 12:07

1 Answers1

-1

You can set the width and height of the divs to specific percentage. In you case width= 100/7~=14% and height = 100/5=20%.

.day{
    display:inline-block;
    width:14%;
    height:20%;
}

Example

ztadic91
  • 2,774
  • 1
  • 15
  • 21