2010-05-26 20:49:01 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								.. _tutorial-css:
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2016-09-08 21:19:48 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								Step 8: Adding Style
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-18 19:15:00 +08:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								====================
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								Now that everything else works, it's time to add some style to the
							 | 
						
					
						
							
								
									
										
										
										
											2014-12-13 14:52:36 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								application.  Just create a stylesheet called :file:`style.css` in the
							 | 
						
					
						
							
								
									
										
										
										
											2016-07-06 08:30:59 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								:file:`static` folder:
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-18 19:15:00 +08:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								.. sourcecode:: css
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    body            { font-family: sans-serif; background: #eee; }
							 | 
						
					
						
							
								
									
										
										
										
											2013-02-28 18:12:16 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    a, h1, h2       { color: #377ba8; }
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-18 19:15:00 +08:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    h1, h2          { font-family: 'Georgia', serif; margin: 0; }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    h1              { border-bottom: 2px solid #eee; }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    h2              { font-size: 1.2em; }
							 | 
						
					
						
							
								
									
										
										
										
											2010-05-30 02:06:12 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-18 19:15:00 +08:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    .page           { margin: 2em auto; width: 35em; border: 5px solid #ccc;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                      padding: 0.8em; background: white; }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    .entries        { list-style: none; margin: 0; padding: 0; }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    .entries li     { margin: 0.8em 1.2em; }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    .entries li h2  { margin-left: -1em; }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    .add-entry      { font-size: 0.9em; border-bottom: 1px solid #ccc; }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    .add-entry dl   { font-weight: bold; }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    .metanav        { text-align: right; font-size: 0.8em; padding: 0.3em;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                      margin-bottom: 1em; background: #fafafa; }
							 | 
						
					
						
							
								
									
										
										
										
											2013-02-28 18:12:16 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    .flash          { background: #cee5F5; padding: 0.5em;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                      border: 1px solid #aacbe2; }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    .error          { background: #f0d6d6; padding: 0.5em; }
							 | 
						
					
						
							
								
									
										
										
										
											2010-05-26 20:49:01 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								Continue with :ref:`tutorial-testing`.
							 |