Adding a bit of style

Now we will add a little bit of CSS to make the post look a little better:

  1. Let's go to style.css and use the article.post with a border at the bottom of each post. The border will be gray, solid and 1px. Also, let's add some padding using padding-bottom: 20px and margin-bottom: 30px:
      article.post{
border-bottom: #ccc solid 1px;
padding-bottom: 20px;
margin-bottom: 30px;
}
  1. Let's add the last article or post. We don't want to have a border for it. We will add article.post and use last-child to target that last one and we'll set border-bottom to none:
      article.post:last-child{
border-bottom:none;
}
  1. For the metadata, we will add a little bit of style using article.post .meta and give it a light gray background. We will also add a little padding, 8px and 12px. Let's add a color; we'll use dark gray.

Let's save that and reload:

Now that looks a little better.

In the next section, we will see how to get the navbar set up with the custom-walker class.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.143.5.201