-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy path_styles.css
More file actions
121 lines (111 loc) · 2.69 KB
/
Copy path_styles.css
File metadata and controls
121 lines (111 loc) · 2.69 KB
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
/******************
Source: http://www.alistapart.com/articles/forward-thinking-form-validation/
*******************/
/* Just some base styles not needed for example to function */
*, html { font-family: Verdana, Arial, Helvetica, sans-serif; }
body, form, ul, li, p, h2, h3, h4, h5
{
margin: 0;
padding: 0;
}
body { background-color: #606061; color: #ffffff; }
img { border: none; }
p
{
font-size: 1em;
margin: 0 0 1em 0;
}
h2 { font-size: 14px; margin: 0 0 12px; }
/* Form styles */
#signup
{
margin: 20px auto;
width: 610px;
}
#signup fieldset
{
margin: 0 0 20px;
padding: 20px;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
}
#signup ol
{
list-style-type: none;
padding: 0;
margin: 0;
}
#signup li
{
margin: 0 0 12px;
position: relative;
}
#signup label
{
width: 150px;
display: inline-block;
vertical-align: top;
}
#signup fieldset input,
#signup fieldset textarea,
#signup fieldset select
{
background: #fff url(ico_validation.png) 379px 24px no-repeat;
display: inline-block;
width: 371px;
border: 1px solid #fff;
padding: 3px 26px 3px 3px;
-moz-transition: background-color 1s ease;
-webkit-transition: background-color 1s ease;
-o-transition: background-color 1s ease;
transition: background-color 1s ease;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
}
#signup fieldset select { width: 401px; padding: 3px; }
#signup fieldset #postcode { padding: 3px; width: 400px; }
#signup input::-webkit-input-placeholder,
#signup input:-moz-placeholder {
color: #A6A6A6;
}
#signup input:focus:required:invalid
{
background-color: pink;
background-position: 379px 3px;
outline: none;
}
#signup input[type=text]:focus:not([pattern]):required:invalid
{
background-color: #fff;
background-position: 379px -29px;
}
#signup .validation01
{
background: red;
color: #fff;
display: none;
font-size: 12px;
padding: 3px;
position: absolute;
right: -160px;
text-align: center;
top: 0;
width: 150px;
-moz-box-shadow: 0px 0px 4px #ffffff;
-webkit-box-shadow: 0px 0px 4px #ffffff;
box-shadow: 0px 0px 4px #ffffff;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
}
#signup input:focus + .validation01 { display: block; }
#signup input:focus:required:valid + .validation01 { background: green; }
#signup input:focus:required:valid + .validation01 .invalid { display: none; }
#signup input:focus:required:invalid + .validation01 .valid { display: none; }
#signup input:required:valid
{
background-color: #fff;
background-position: 379px -61px;
}