# How to adjust the line height with CSS?

**URL:** <https://forum.obsidian.md/t/how-to-adjust-the-line-height-with-css/9747>\
**Category:** Help\
**Created:** [December 9, 2020, 7:44am UTC](https://forum.obsidian.md/t/how-to-adjust-the-line-height-with-css/9747 "2020-12-09T07:44:45Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![GLight](https://forum.obsidian.md/user_avatar/forum.obsidian.md/glight/32/4851_2.png) [@GLight](https://forum.obsidian.md/u/GLight)\
**Post date:** [December 10, 2020, 5:11am UTC](https://forum.obsidian.md/t/how-to-adjust-the-line-height-with-css/9747/2 "2020-12-10T05:11:07Z")

</div>

the following post is inspiring.

> [@Getting comfortable with Obsidian CSS](https://forum.obsidian.md/t/getting-comfortable-with-obsidian-css/133/5):
>
> You make some good points here @goodsignal, so I’d just like to clarify some of it for you. Firstly, I don’t think anything in css can break the app or your notes. Css is just presentation and can’t really affect any data. So feel free to experiment! Go nuts! If you’ve been playing around with the css in the dev tools and gotten lost and things look broken or wrong, a quick reload (ctrl+r I think) or closing and opening Obsidian should fix it. If you mess up your obsidian.css you can always d…

I found a solution and the code is posed below.

```
.CodeMirror pre.CodeMirror-line {
  line-height: 1.4;/*height of a*/
  padding-top: 6px; /*the lower part of height of b*/
  padding-bottom: 6px;/*the upper part of height of b*/
}

```

And the code for adjusting the height of the list item in Preview mode is:

```
li{
  padding-top: 6px;
  padding-bottom: 6px;
  line-height: 1.4;
}

```

---

_[View the full topic](https://forum.obsidian.md/t/how-to-adjust-the-line-height-with-css/9747)._
