├── main.js
├── images
└── att.png
├── README.md
├── grid.css
├── index.html
└── main.css
/main.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/images/att.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jspruance/rwd-template-poc/master/images/att.png
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # rwd-template-poc
2 | This is a RWD template layout POC. It does not use any frameworks but featuring a lightweight, homebrew grid system, 'liquid' layout using percentages and ems and responds to various screen sizes via CSS media queries.
3 |
--------------------------------------------------------------------------------
/grid.css:
--------------------------------------------------------------------------------
1 | /* Grid CSS */
2 |
3 | .grid {
4 | width: 100%;
5 | float: left;
6 | }
7 |
8 | .grid [class*="grid-"] {
9 | float: left;
10 | padding: 10px 40px 10px 10px;
11 | position: relative;
12 | }
13 |
14 |
15 | @media only screen and (max-width : 320px) {
16 |
17 | .grid [class*="grid-"] {
18 | width: 100%;
19 | margin: 0 0 5px 0;
20 | padding: 5px 20px 5px 5px;
21 | border: 1px dotted black;
22 | }
23 |
24 | }
25 |
26 | @media only screen and (min-width : 321px) and (max-width : 480px) {
27 |
28 | .grid [class*="grid-"] {
29 | width: 100%;
30 | margin: 0 0 15px 0;
31 | border: 1px dotted blue;
32 | }
33 |
34 | }
35 |
36 | @media only screen and (min-width : 481px) and (max-width : 767px) {
37 |
38 | .grid [class*="grid-"] {
39 | margin: 0 0 20px 0;
40 | border: 1px dotted red;
41 | }
42 |
43 | .grid {
44 | padding: 10px;
45 | }
46 |
47 | .grid [class*="grid-"]:last-child {
48 | padding-right: 0;
49 | }
50 |
51 | .grid-1-4,
52 | .grid-1-5,
53 | .grid-1-6,
54 | .grid-1-8,
55 | .grid-3-4,
56 | .grid-4-5,
57 | .grid-5-6,
58 | .grid-7-8
59 | {
60 | width: 50%;
61 | }
62 |
63 | .grid-1-3 {
64 | width: 33.33%;
65 | }
66 | .grid-1-2 {
67 | width: 50%;
68 | }
69 | .grid-1-1 {
70 | width: 100%;
71 | }
72 | .grid-2-3 {
73 | width: 66.66%;
74 | }
75 |
76 | }
77 |
78 | @media only screen and (min-width: 768px) {
79 |
80 | .grid {
81 | padding: 20px;
82 | }
83 |
84 | .grid [class*="grid-"] {
85 | margin: 0 0 25px 0;
86 | border: 1px dotted lightgreen;
87 | }
88 |
89 | .grid [class*="grid-"]:last-child {
90 | padding-right: 0;
91 | }
92 |
93 | .grid-1-8 {
94 | width: 12.5%;
95 | }
96 | .grid-1-6 {
97 | width: 16.66%;
98 | }
99 | .grid-1-5 {
100 | width: 20%;
101 | }
102 | .grid-1-4 {
103 | width: 25%;
104 | }
105 | .grid-1-3 {
106 | width: 33.33%;
107 | }
108 | .grid-1-2 {
109 | width: 50%;
110 | }
111 | .grid-1-1 {
112 | width: 100%;
113 | }
114 | .grid-2-3 {
115 | width: 66.66%;
116 | }
117 | .grid-3-4 {
118 | width: 75%;
119 | }
120 | .grid-4-5 {
121 | width: 80%;
122 | }
123 | .grid-5-6 {
124 | width: 83.33%;
125 | }
126 | .grid-7-8 {
127 | width: 87.5%;
128 | }
129 |
130 | }
--------------------------------------------------------------------------------
/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Responsive Web Design POC
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
23 |
24 |
25 |
26 |
27 |
28 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
Check Availability
56 |
grid-1-1
57 |
grid-1-3
grid-2-3
58 |
grid-2-3
grid-1-3
59 |
grid-1-4
grid-1-4
grid-1-4
grid-1-4
60 |
grid-1-6
grid-5-6
61 |
grid-1-6
grid-1-6
grid-1-6
grid-1-2
62 |
grid-1-8
grid-1-8
grid-1-8
grid-1-8
63 |
grid-1-8
grid-1-8
grid-1-8
grid-1-8
64 |
65 |
66 |
67 |
68 |
74 |
75 |
76 |
77 |
78 |
--------------------------------------------------------------------------------
/main.css:
--------------------------------------------------------------------------------
1 | body {
2 | margin: 0;
3 | padding: 0;
4 | font-family: Arial,Helvetica,sans-serif;
5 | }
6 |
7 | *, *::after, *::before {
8 | box-sizing: border-box;
9 | }
10 |
11 | section {
12 | padding-top: 25px;
13 | }
14 |
15 | /* mobile nav styles */
16 | #mobile-nav {
17 | display: none;
18 | }
19 |
20 | #mobile-topnav {
21 | background-color: #fd990c;
22 | background-image: linear-gradient(to bottom, #fcb314, #ff7200);
23 | border-radius: 0;
24 | box-shadow: 0 0 1px 0 rgba(153, 153, 153, 0.2);
25 | color: #fff;
26 | height: 42px;
27 | position: relative;
28 | width: 100%;
29 | z-index: 1040;
30 | }
31 |
32 | #mobile-bottom-nav {
33 | background-color: #2f3b44;
34 | background-image: linear-gradient(to bottom, #3d4d58, #2f3b44);
35 | background-repeat: repeat-x;
36 | border-top: 1px solid #b55e17;
37 | height: 40px;
38 | margin-bottom: 10px;
39 | }
40 |
41 | /* desktop nav styles */
42 |
43 | #top-nav {
44 | width: 100%;
45 | height: 34px;
46 | background: #595959 none repeat scroll 0 0;
47 | color: #fff;
48 | font-size: 12px;
49 | }
50 |
51 | #top-nav nav ul {
52 | padding: 0;
53 | margin: 0;
54 | }
55 |
56 | .page-wrap, footer, #inside-nav {
57 | margin: 0 auto;
58 | max-width: 1004px;
59 | position: relative;
60 | width: 90%;
61 | }
62 |
63 | #content-wrap {
64 | float: left;
65 | border: 1px solid #ccc;
66 | border-radius: 5px;
67 | padding: 20px;
68 | width: 100%;
69 | }
70 |
71 | @media only screen and (max-width : 320px) {
72 |
73 | #content-wrap {
74 | padding: 5px;
75 | border: none;
76 | }
77 |
78 | #mobile-nav {
79 | display: block;
80 | }
81 |
82 | #desktop-nav {
83 | display: none;
84 | }
85 |
86 | .page-wrap, footer, #inside-nav {
87 | width: 100%;
88 | }
89 |
90 | }
91 |
92 | @media only screen and (min-width : 321px) and (max-width : 480px) {
93 |
94 | #content-wrap {
95 | padding: 10px;
96 | border: none;
97 | }
98 |
99 | #mobile-nav {
100 | display: block;
101 | }
102 |
103 | #desktop-nav {
104 | display: none;
105 | }
106 |
107 | .page-wrap, footer, #inside-nav {
108 | width: 100%;
109 | }
110 |
111 | }
112 |
113 | @media only screen and (min-width : 481px) and (max-width : 767px) {
114 |
115 | #content-wrap {
116 | padding: 15px;
117 | }
118 |
119 | #mobile-nav {
120 | display: none;
121 | }
122 |
123 | #desktop-nav {
124 | display: block;
125 | }
126 |
127 | }
128 |
129 | @media only screen and (min-width: 768px) {
130 |
131 | #mobile-nav {
132 | display: none;
133 | }
134 |
135 | #desktop-nav {
136 | display: block;
137 | }
138 |
139 | }
140 |
141 | #main-nav {
142 | padding: 35px 0 35px 0;
143 | }
144 |
145 | nav > ul > li {
146 | display: inline-block;
147 | margin-right: 15px;
148 | position: relative;
149 | }
150 |
151 | nav ul, nav ol {
152 | list-style: outside none none;
153 | }
154 |
155 | #nav-bar {
156 | background: #ef6f00 none repeat-x scroll 0 0;
157 | border-radius: 4px;
158 | box-sizing: border-box;
159 | height: 45px;
160 | margin: 0 auto;
161 | position: relative;
162 | color: #fff;
163 | padding: 0;
164 | }
165 |
166 | #nav-bar li > a::after {
167 | background-image: url("images/att.png");
168 | content: " ";
169 | display: block;
170 | float: left;
171 | height: 16px;
172 | left: 0;
173 | margin-top: -10px;
174 | opacity: 1;
175 | position: absolute;
176 | top: 50%;
177 | width: 2px;
178 | }
179 |
180 | #nav-bar li a {
181 | background-image: url("images/att.png");
182 | background-size: 41px 37px;
183 | display: block;
184 | height: 34px;
185 | margin: 5px 22px 0;
186 | overflow: hidden;
187 | padding: 0;
188 | text-indent: -999em;
189 | width: 37px;
190 | }
191 |
192 | footer {
193 | font-size: 11px;
194 | clear: both;
195 | padding: 0 20px 40px 20px;
196 | }
197 |
198 |
199 |
200 |
201 |
202 |
203 |
--------------------------------------------------------------------------------