Don't know what to call the layout i'm trying to do, but it's often used on restaurant menus. You have a column of items on the left with their prices in a column on the right and a row of dots connecting them together.
ie:
food item .......... $14.95
desert .............. $4.11
This has been harder to achieve then i expected. I've got a section of the technical product data i'm dealing with laid out properly (using an unordered list with the left and right columns in spans). My problem is that regardless of weather i use a bottom-border or a repeating background image for the dots they go all the way across under each row.
How do i move the border or the background image up so that it goes behind the spanned text? I'd prefer to use the background image. I've put a background colour on the spans which should prevent the image from appearing behind the text.
Here's the code i'm working with:
ie:
food item .......... $14.95
desert .............. $4.11
This has been harder to achieve then i expected. I've got a section of the technical product data i'm dealing with laid out properly (using an unordered list with the left and right columns in spans). My problem is that regardless of weather i use a bottom-border or a repeating background image for the dots they go all the way across under each row.
How do i move the border or the background image up so that it goes behind the spanned text? I'd prefer to use the background image. I've put a background colour on the spans which should prevent the image from appearing behind the text.
Here's the code i'm working with:
Code:
<div class="techdata">
<ul>
<li><span class="property">Manufacturer</span><span class="spec">JOKAB SAFETY</span></li>
<li><span class="property">Ordering Data</span><span class="spec">RT7A delay 0 - 1.5 s</span></li>
<li class="extradata"><span>RT7B delay 0 - 3.0 s</span></li>
<li><span class="property">Color</span><span class="spec">black and beige</span></li>
<li><span class="property">Weight</span><span class="spec">405 g (24 VDC), 550 g (24-230 VAC)</span></li>
<li><span class="property">Supply Voltage (A1-A2)</span><span class="spec">24 VDC +15/-20%,</span></li>
<li class="extradata">24/48/115/230 VAC, +/-15%, 50-60 Hz</li>
<li class="heading">Power Consumption</li>
<li><span class="label">DC supply, nominal voltage</span><span class="spec">4.6 W</span></li>
<li><span class="label">AC supply, nominal voltage</span><span class="spec">8.7 VA</span></li>
<li><span class="property">Connections S13</span><span class="spec">Short-circuit</span></li>
<li class="extradata">protected voltage output,</li>
<li class="extradata">70mA +/- 10% current limitation.</li>
<li class="extradata">Is used for the inputs S14, S32 and S44</li>
<li><span class="property">Connections S53</span><span class="spec">Short-circuit</span></li>
<li class="extradata">protected voltage output,</li>
<li class="extradata">internal automatic fuse, max 270 mA.</li>
<li class="extradata">Is used for the reset and autoreset</li>
<li class="extradata">inputs X1 and X4.</li>
</ul>
</div>
Code:
/* Technical Data UL styles */
div.techdata { width:100%; margin:0 auto; padding:0px 0; margin:0 auto; border:1px solid #ccc; clear:both; text-align:right; }
div.techdata ul { width:100%; list-style:none; display:block; padding:0; margin:0; }
div.techdata ul li { background:url(../images/misc/dot.gif) repeat-x left bottom #fffef2; clear:both; display:block; text-align:right; }
/* background-image: url(../images/misc/dot.gif); background-repeat: repeat-x; background-position: left bottom; */
/* background:url(../images/misc/dot.gif) repeat-x left bottom #fff; */
/* border-bottom:2px dotted black; */
li span.property { display:block; float:left; font-weight:bold; clear:left; padding:0; margin:0; background-color:#fffef2; top:5px; }
li span.label { display:block; float:left; font-weight:normal; clear:left; padding:0; margin:0; background-color:#fffef2; top:5px; }
li span.spec { display:block; text-align:right; padding:0; margin:0; background-color:#fffef2; }
div.techdata ul li.extradata { text-align:right; border:0; background:none; clear:both; }
div.techdata ul li.heading { text-align:left; font-weight:bold; background:none; clear:both; margin-top:0.6em; }