In a couple of earlier questions, I've been trying to replicate the following table of contents:
Some suggestions have been helpful, but the "A REVIEW..." part is still broken: see this JSBin or a variation at this jsfiddle.
The CSS is as follows:
.list li {
position:relative;
overflow:hidden;
width:330px;}
.list li:after {
font-family: Times New Roman;
font-size: 120%;
content:"...............";
text-indent: -1px;
display:block;
letter-spacing:34px;
position:absolute;
left:0px;
bottom:0px;
z-index:-1;
font-weight:bold;}
.list li span {
display:inline;
background-color:#FFF;
padding-right:5px;}
.list li .number {
float:right;
font-weight:bold;
padding-left:8px;}
Any help would be great, thanks.
There's a very simple fix. Just change the
left
setting for the "..." pseudo element to1em
.jsFiddle Demo
Update:
There was an issue with the location of the right number when the title is wrapped to a second line. It can be fixed by adding a class called "two-lines".
jsFiddle Demo