-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstyles.css
68 lines (57 loc) · 1.88 KB
/
styles.css
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
/*
This is a good layout for a mobile-first CSS template.
Following this flow will minimize the number of styles you need to write and will ensure you are thinking, designing and developing mobile-first.
Most of your styles get written like standard CSS, but for your mobile presentation. Generally speaking, a good mobile presention will stretch out nicely for larger screens.
Sometimes, when we stretch out to larger screens, we need to make minor tweaks for the larger devices -- you can make these tweaks in the tablet media query, or if the issue exists on desktop only, the desktop media query.
You will find this is far easier than the opposite task of using CSS to cram your desktop experience into a mobile device.
*/
/* THIS LINE LOADS IN A NICE RESET TO ENSURE ALL BROWSERS HAVE THE SAME BASE STYLES */
@import url('https://cdnjs.cloudflare.com/ajax/libs/normalize/7.0.0/normalize.min.css');
/* Start your base/mobile styles here */
html, body {
/* Sets default font-size to 16px, ensuring 1em = 16px; */
font-size: 16px;
display: block;
line-height: 1.5;
text-align: left;
margin: auto;
}
/*center paragraphs and also space the text between pictures and text*/
header {
text-align: center;
}
p, {
margin: 40px auto;
display: block;
}
body {
margin: 100;
padding: 50px;
}
img {
width: 100%;
margin: auto;
display: block;
}
/* Tablet/Desktop overrides */
@media(min-width: 681px) {
/* Any adjustments for tablets and larger go here. Note these styles will be applied to anything 681px or larger -- so tablet AND desktop */
img {
width: 50%;
}
div {
width: 50%;
}
}
@media(min-width: 729px) {
/* Any adjustments for desktop and larger go here. Note these styles will be applied to anything 729px or larger -- so desktop */
img {
width: 100%;
display: block;
}
.container {
max-width: 745px;
display: block;
margin: 0 auto;
}
}