Unnötig komplexe CSS-Selektoren vereinfacht
[website] / src / main / webapp / less / screen / layout.less
1 body
2 {
3   padding: 0 3em 0 5em;
4 }
5
6 #header
7 {
8   margin-left: -2.125em;
9 }
10
11 .content
12 {
13   position: relative;
14   height: 100%;
15   padding-bottom: 7.1875em; /** 115px (gemessene Gesamthöhe des Footers - mit Abstand und Margin) */
16 }
17 .cols_2 > .content
18 {
19   padding-right: 27em;
20   margin-right: -24.375em;
21 }
22 .cols_2 > .content > .main
23 {
24   float: left;
25   min-height: 1em;
26   position: relative;
27   width: 100%;
28 }
29 .cols_1 > .content > .marginal
30 {
31   margin-top: 3em;
32   background-color: @heller;
33 }
34 .cols_2 > .content > .marginal
35 {
36   float: left;
37   margin: 0 -27em 0 2.625em;
38   padding: 0 2em 1.0625em 2em;
39   position: relative;
40   width: 20.375em;
41   background-color: @heller;
42 }
43 .content > .marginal h1,
44 .content > .marginal h2,
45 .content > .marginal h3,
46 .content > .marginal h4
47 {
48   color: @hintergrund;
49 }
50 .content > .marginal h1:first-child,
51 .content > .marginal h2:first-child,
52 .content > .marginal h3:first-child,
53 .content > .marginal h4:first-child
54 {
55   margin-top: 0;
56 }
57 .cols_1 > .content > .marginal aside.m
58 {
59   padding: 2em;
60 }
61 #nav
62 {
63   position: absolute;
64   top: 0;
65   right: 0; /** Hier eigentlich nicht nötig, aber für Tablet-Style erforderrlich! */
66   width: 100%;
67 }
68 .cols_2 #nav
69 {
70   position: relative;
71   top: auto;
72   right: auto;
73   width: 22.375em; /** 358px = 326px + 32px*/
74 }
75 .cols_2 #menu
76 {
77   margin: 0 0 -2.125em 0; /** 0 0 -34px 0 */
78 }
79 .cols_1 #menu
80 {
81   position: absolute;
82   top: -7em; /** 112px */
83   right: 0;
84   margin: 0;
85 }
86
87 /** Always display vertical scroll-bars */
88 body { overflow-y: scroll; }
89
90 /** Center content, when screen is bigger than 1240 */
91 #page
92 {
93   max-width: 62.375em; /** 608px + 390px (Marginalspalte) = ca. 1000px */
94   margin: 0 auto;
95 }
96
97 /** Faux-Column-Hack-Eigengewächs */
98 #page.cols_2
99 {
100   max-width: 38em; /** 608px + 390px (Marginalspalte) = ca. 1000px */
101   border-right: 24.375em solid @heller;
102 }
103 #header
104 {
105   padding-top: 1em;
106 }
107 .cols_2 > #header
108 {
109   margin-right: -24.375em;
110   background-color: @hintergrund;
111 }
112 .cols_2 > #breadcrumb
113 {
114   right: -24.375em; /** Weil der Breadcrumb sonst an der Faux-Column umbricht! */
115 }
116 .cols_2 > #footer
117 {
118   margin-right: -24.375em;
119   background-color: @hintergrund;
120 }