I am designing the comments section of a blog right now. My markup is a ordered list item per comment. Inside I have a heading floated left and some span-tag floated right in a header. I tried to clearfix the header (e. g. every clearfix-hack from this list: http://red-team-design.com/clearing-floats-nowadays/), but nothing worked in a way that the number stays where it should.
I made a fiddle to play around a bit, but could not get it working.
html:
<ol>
<li>
<article>
<header class="clearfix">
<h4>Heading</h4>
<span>Some link</span>
</header>
<p>Some content.</p>
</article>
</li>
</ol>
css:
ol, li, article, header, h4, span {
font-size: 14px;
line-height: 28px;
margin: 0;
padding: 0;
}
ol {
margin: 0 0 28px 28px;
}
h4 {
float: left;
}
span {
float: right;
}
If there is no good way to solve this, I am open to suggestions for markup-changes.
Edit: This is how I want it to look like:
1. Heading Some link|
Some content comes her. Text,|
text, text, text, text, text,|
text and more text. |
|
2. A much longer heading |
Some link|
Some content and so on... |
|
|
3. Even headings can be very, |
very long Some link|
Content goes here. |
^Right border of containing element.