I have this note
---
aliases: [Notiz, ]
tags: [Notiz, ]
---
## 1 A
### 1.1 a
### 1.2 a
## 2 B
### 2.1 b
### 2.2 b
## 3 C
### 3.1 c
### 3.2 c
## 4 D
### 4.1 d
### 4.2 d
## 5 E
### 5.1 e
### 5.2 e
and I’d like to have a yellow background for the second last ## headline. In this case, this should format only this headline.
## 4 D
The formating should work in preview and edit mode.
What works:
This code
.HyperMD-header-2:last-child {
background-color: green !important;
}
.HyperMD-header-2:nth-last-child(2) {
background-color: yellow !important;
}
Looks so:
But when I open the arrows, there is no formating anymore.
(There is no change in view mode at the moment.)
What can I do to see the headlines “## 4 D” background yellow formated in edit and view mode, independent of if the headline is open or closed?