or: I need a opaque transparency!
edit based on comments and answer: I try to find a solution for leading / trailing dots on a non constant background ie. picture. The solutions I found and found at others, draw dots in the back and over draw it with the text. but this does not work or looks bad with picture backgrounds.
Imagine a price list; looking like this
spoon .............. 0,10
knife .............. 0,20
sharp knife ....... 10,20
a complete set
of spoons .......... 8,40
but also
best price
spoon .......... 0,09
knife .......... 0,90
best quality
spoon .......... 2,60
The point is descriptions starts left - price ends right and "dots" fill and all is table like.
My ideas are - and I break it down to basics;
description is a div with left aligned text, price a div with right aligned text, and I have jQuery that sizes the div in the middle when rendering, this div has the dots as background (I don't care if they are aligned - ie. all dots above same column)
but - the spoon collection breaks the logic:
spoon .............. 0,10
knife .............. 0,20
sharp knife ....... 10,20
a complete set
of spoons .... 8,40
Next idea:
Make background width dots and a span inside the div that override the background - that has the dots - with white.
Here I try to show with a semi opaque background - the dots are here - but hard to see
.background {
background: url(http://keepitsimple-soft.com/assets/gif/dark_mtall.png);
}
.item-line {
background: url(http://keepitsimple-soft.com/assets/gif/8/light_back.png) ;
background-repeat: repeat-x;
background-position: 0 bottom;
}
.desc {
width:100px;
}
.opaque{
padding-right:15px;
background:rgba(255,255,255,0.1);
}
<div class='background'>
<div class='item-line'>
<div class='desc'>
<span class='opaque'> the spoons are annoying </span>
</div>
</div>
</div>
this works in all cases, except there is a background for the whole thing, like show in snipped ...
so i would need a "opaque transparency" - any ideas