After sleeping another night over the problem I tried a different approach and it worked fine. Basically I am using list-style-type: none
, a clearfix-hack and get my numbers from CSS counters.
The (updated) full solution (The old solution):
ol {
margin: 0 0 2em 2em;
list-style-type: none;
counter-reset: comment;
}
ol li article header h4::before {
counter-increment: comment;
content: counter(comment) ".\00A0";
display: block;
width: 10em;
text-align: right;
position: absolute;
left: -10em;
}
header {
position: relative;
}
h4 {
display: inline;
}
span {
float: right;
}
.clearfix::after
{
visibility: hidden;
display: block;
font-size: 0;
content: " ";
clear: both;
height: 0;
}
Thank you very much, Dave and Notulysses!
(If anyone happend to know, WHY there is a problem with lists and clearfix-hacks, I would not mind, if she/he could explain that to me.)