1+ <!DOCTYPE html>
2+ < html lang ="en ">
3+ < head >
4+ < meta charset ="utf-8 ">
5+ < meta name ="viewport " content ="width=device-width, initial-scale=1, maximum-scale=1 ">
6+ < title > Ladies Learning Code: Intro to HTML & CSS</ title >
7+ <!-- Don't alter slideshow.css, CSSS slide deck needs it to work -->
8+ < link rel ="stylesheet " href ="css/slideshow.css ">
9+
10+ <!-- Theme-specific styles -->
11+ < link href ='http://fonts.googleapis.com/css?family=Quicksand|Pacifico|Open+Sans:400,300 ' rel ='stylesheet ' type ='text/css '>
12+ < link rel ="stylesheet " href ="css/font-awesome.css ">
13+ < link rel ="stylesheet " href ="css/highlightjs-themes/monokai.css ">
14+ < link rel ="stylesheet " href ="css/theme-llc.css ">
15+ < link rel ="shortcut icon " href ="img/favicon.ico ">
16+
17+ <!-- Workshop-specific styles -->
18+ < link rel ="stylesheet " href ="css/workshop.css ">
19+
20+ <!-- Takes care of CSS3 prefixes! -->
21+ < script src ="scripts/prefixfree.min.js "> </ script >
22+ </ head >
23+
24+ < body >
25+
26+ < base target ="_blank ">
27+
28+ < main >
29+ < section class ="slide " data-markdown >
30+ ##Create a Sticky Footer
31+
32+ We'll be following these instructions: http://css-tricks.com/snippets/css/sticky-footer/
33+
34+ First, we need to create a page wrapper around the page content only, not the footer content. The home page HTML will look like similar to this:
35+
36+ ```
37+ <div class="page-wrap">
38+ <nav>
39+ ...
40+ </nav>
41+
42+ <header>
43+ <h1>Jane Smith</h1>
44+ <h2>Web Developer + City Girl</h2>
45+ </header>
46+ </div><!-- close .page-wrap -->
47+ <footer>
48+ ...
49+ </footer>
50+ ```
51+
52+ The about and contact pages will look like this:
53+
54+ ```
55+ <div class="page-wrap">
56+ <header>
57+ <h1>Jane Smith</h1>
58+ <h2>Web Developer + City Girl</h2>
59+
60+ <nav>
61+ ...
62+ </nav>
63+ </header>
64+ </div><!-- close .page-wrap -->
65+ <footer>
66+ ...
67+ </footer>
68+ ```
69+ </ section >
70+
71+ < section class ="slide " data-markdown >
72+ ##Sticky Footer CSS
73+
74+ ```
75+ /* sticky footer */
76+ html, body {
77+ height: 100%;
78+ }
79+ .page-wrap {
80+ min-height: 100%;
81+ margin-bottom: -35px; /* must be the same height as footer */
82+ }
83+ .page-wrap:after {
84+ content: "";
85+ display: block;
86+ }
87+ footer, .page-wrap:after {
88+ height: 35px; /* wowever tall you want the footer to be */
89+ }
90+ footer {
91+ background: #222;
92+ color: #ccc;
93+ }
94+ ```
95+ </ section >
96+
97+ < section class ="slide " data-markdown >
98+ ##One more update
99+
100+ Let's revise the CSS for the paragraph in the footer.
101+
102+ ```
103+ footer {
104+ clear: both;
105+ padding: 5px; /* adds space inside the footer */
106+ }
107+ footer p {
108+ margin: 0; /* removes default margin from paragraph */
109+ }
110+ ```
111+ Compare your page with this [example](../project/examples/sticky-footer-home.html).
112+ </ section >
113+
114+ </ main > <!-- cls main section -->
115+
116+ < footer >
117+ < p class ="license "> < a rel ="license " href ="http://creativecommons.org/licenses/by-nc/4.0/ "> < img alt ="Creative Commons License " src ="img/cc-by-nc.svg " /> </ a > by < a xmlns:cc ="http://creativecommons.org/ns# " href ="http://ladieslearningcode.com " property ="cc:attributionName " rel ="cc:attributionURL "> Ladies Learning Code</ a > </ p >
118+ < p class ="instructions "> Use the left < i class ="fa fa-arrow-left "> </ i > and right < i class ="fa fa-arrow-right "> </ i > arrow keys to navigate</ p >
119+ </ footer >
120+
121+ < script src ="http://code.jquery.com/jquery-1.11.0.min.js "> </ script >
122+ < script src ="scripts/slideshow.js "> </ script >
123+
124+ <!-- Uncomment the plugins you need -->
125+ < script src ="scripts/plugins/css-edit.js "> </ script >
126+ < script src ="scripts/plugins/css-snippets.js "> </ script >
127+ < script src ="scripts/plugins/css-Ctrls.js "> </ script >
128+ <!-- <script src="plugins/code-highlight.js"></script>-->
129+
130+ < script src ="scripts/plugins/markdown/marked.js "> </ script >
131+ < script src ="scripts/plugins/markdown/markdown.js "> </ script >
132+ < script src ="scripts/plugins/highlight/highlight.js "> </ script >
133+ < script > hljs . initHighlightingOnLoad ( ) ; </ script >
134+
135+ <!-- Prettify -->
136+ < script src ="scripts/plugins/prettify.js "> </ script >
137+ < script src ="scripts/plugins/lang-css.js "> </ script >
138+ < script src ="scripts/plugins/prism.js "> </ script >
139+
140+ < script >
141+ var slideshow = new SlideShow ( ) ;
142+
143+ // Grabs all the .snippet elements
144+ var snippets = document . querySelectorAll ( '.snippet' ) ;
145+ for ( var i = 0 ; i < snippets . length ; i ++ ) {
146+ new CSSSnippet ( snippets [ i ] ) ;
147+ }
148+
149+ // Opens all links in a new window
150+ var links = document . getElementsByTagName ( "a" ) ;
151+ for ( var i = 0 ; i < links . length ; i ++ ) {
152+ var link = links [ i ] ;
153+ link . addEventListener ( function ( ) {
154+ window . open ( this . href ) ;
155+ } ) ;
156+ }
157+
158+ jQuery ( document ) . ready ( function ( ) {
159+ jQuery ( ".snippet" ) . before ( "<span class=\"edit\">edit me</span>" ) ;
160+ } ) ;
161+ </ script >
162+ </ body >
163+ </ html >
0 commit comments