I have a list, which leaves some spaces for indentation purposes and also provides dashed underlying. However the display
properties used for this list do no match, causes the text to change line when a space is found. Here is a Fiddle.
The CSS:
.dashed {
display: block;
width: 100%;
height: 90%;
border-bottom: dashed 2px #54687a;
}
li {
display: table-row;
}
li span {
display: table-cell;
padding-right: 1em;
}
I tried to keep only one display
property, but that failed. Anyone has a fix for this please?
Let's speak with images!
What happens now - it's the problem:
Desired result:
UPDATED - Final css should be like
Check the UPDATED demo - http://jsfiddle.net/cmfL2643/21/
Remove the
dashed
class, and add these styles:Fiddle
I just updated your fiddle
I added in your CSS
Are you trying to get it so that everything is in one line, like this?
If so, try this:
You'll likely have better luck with
display: block;
on the list items anddisplay: inline-block;
on the span.table-cell
is causing the line to wrap around.http://jsfiddle.net/daCrosby/cmfL2643/18/