I'm trying to add 10px padding to the Story box using CSS, without adding any new extra HTML elements to the website code.
Is there any way to add the padding to the Story box, without adding a new extra HTML element?
In other words:
How to select ONLY the Story box using only CSS, without selecting the <summary>
part with it? (I like the current layout of the <summary>
I don't want to change anything there.)
details {
overflow: hidden;
padding: 0px;
outline: 1px solid black
}
summary {
cursor: pointer;
display: block;
padding: 10px;
user-select: none
}
<details>
<summary>Our Next Holiday Options</summary>
Story Story Story Story Story Story Story Story Story tory Story Story Story Story Story Story Story Story ory Story Story Story Story Story Story Story Story ry Story Story Story Story Story Story Story Story y Story Story Story Story Story Story Story
Story Story Story Story Story Story Story Story Story
</details>