If Iphone 5 (320x568) is in the portrait mode its width is 320px. When it is in the landscape mode is its width 320px and orientation is landscape, or its width is 568px and the orientation is landscape. I am talking about the width that CSS sees.
In other words, does this code work in landscape mode as well, so the site (wrapped by #container) occupies the whole screen in this case and not just the 320px?
@media (max-width: 568px) and (min-width:320) {
#container {
max-width: 790px;
width: 100%;
}