published: {{ post.published_date }}
{{ post.title }}
{{ post.text|linebreaks }}
# CSS - make it pretty! Our blog still looks pretty ugly, right? Time to make it nice! We will use CSS for that. ## What is CSS? Cascading Style Sheets (CSS) is a language used for describing the look and formatting of a website written in markup language (like HTML). Treat it as make-up for our webpage ;). But we don't want to start from scratch again, right? We will, once more, use something that has already been done by programmers and released on the Internet for free. You know, reinventing the wheel is no fun. ## Let's use Bootstrap! Bootstrap is one of the most popular HTML and CSS frameworks for developing beautiful websites: http://getbootstrap.com/ It was written by programmers who worked for Twitter and is now developed by volunteers from all over the world. ## Install Boostrap To install Bootstrap, you need to add this to your `
` in your `.html` file (`blog/templates/blog/post_list.html`): This doesn't add any files to your project. It just points to files that exist on the internet. Just go ahead, open your website and refresh the page. Here it is!  Looking nicer already! ## Static files in Django Another thing you will learn about today is called __static files__. Static files are all your CSS and images -- files that are not dynamic, so their content doesn't depend on request context and will be the same for every user. CSS is a static file, so in order to customize CSS, we need to first configure static files in Django. You'll only need to do it once. Let's start: ### Configure static files in Django First, we need to create a directory to store our static files in. Go ahead and create a directory called `static` inside your `djangogirls` directory. djangogirls ├─── static └─── manage.py Open up the `mysite/settings.py` file, scroll to the bottom of it and add the following lines: STATICFILES_DIRS = ( os.path.join(BASE_DIR, "static"), ) This way Django will know where to find your static files. ## Your first CSS file! Let's create a CSS file now, to add your own style to your web-page. Create a new directory called `css` inside your `static` directory. Then create a new file called `blog.css` inside this `css` directory. Ready? static └─── css blog.css Time to write some CSS! Open up the `static/css/blog.css` file in your code editor. We won't be going too deep into customizing and learning about CSS here, because it's pretty easy and you can learn it on your own after this workshop. We really recommend doing this [Codeacademy HTML & CSS course](http://www.codecademy.com/tracks/web) to learn everything you need to know about making your websites more pretty with CSS. But let's do at least a little. Maybe we could change the color of our header? To understand colors, computers use special codes. They start with `#` and are followed by 6 letters (A-F) and numbers (0-9). You can find color codes for example here: http://www.colorpicker.com/. You may also use [predefined colors](http://www.w3schools.com/cssref/css_colornames.asp), such as `red` and `green`. In your `static/css/blog.css` file you should add the following code: h1 a { color: #FCA205; } `h1 a` is a CSS Selector. This means we're applying our styles to any `a` element inside of an `h1` element (e.g. when we have in code something like: `