css device orientation

Solutions on MaxInterview for css device orientation by the best coders in the world

showing results for - "css device orientation"
Carolina
27 Nov 2019
1/* For portrait, we want the tool bar on top */
2
3@media screen and (orientation: portrait) {
4  #toolbar {
5    width: 100%;
6  }
7}
8
9/* For landscape, we want the tool bar stick on the left */
10
11@media screen and (orientation: landscape) {
12  #toolbar {
13    position: fixed;
14    width: 2.65em;
15    height: 100%;
16  }
17
18  p {
19    margin-left: 2em;
20  }
21
22  li + li {
23    margin-top: .5em;
24  }
25}
26