[thelist] Dotted line to fill table cell?

DESCHAMPS Stéphane DvSI/SICoR stephane.deschamps at francetelecom.com
Mon Mar 11 03:20:00 CST 2002


In CSS you could do something like this :
<td class="dotted"><span class="notdotted">bla bla</span></td>

Your CSS would be:
.dotted { background-color:#COLOROFYOURCHOICE; background-image :
url('dotted.gif'); background-repeat: repeat-x; }
.notdotted { background-color:#COLOROFYOURCHOICE; }

I'd say that would do the trick. It not create an opaque GIF for the
background of .notdotted.

What do you think?

HTH
stef

> -----Message d'origine-----
> De : thelist-admin at lists.evolt.org
> [mailto:thelist-admin at lists.evolt.org]De la part de Chris Blessing
> Envoyé : lundi 11 mars 2002 05:06
> À : thelist at lists.evolt.org
> Objet : RE: [thelist] Dotted line to fill table cell?
>
>
> Rachel-
>
> If you don't have the option of using some sort of image with some
> server-side width= magic, you could perhaps try using a
> fixed-width font and
> javascript to count the number of characters filling the
> first portion of
> the table cell, then tack on the difference in dots.  Example...
>
> String in cell:
>    var strItem = "Blah this is a string";
>
> String in cell's length (21 chars):
>    var strItemLen = strItem.length;
>
> Total width of table cell in characters:
>    var intTotalLen = 50;
>
> Figure out how many dots we need to add on:
>    var intDotsToAdd = intTotalLen - strItemLen;
>
> Compose and write the new string:
>    var strNewItem = strItem;
>    for(var i=0; i<intDotsToAdd; i++){
>       strNewItem += ".";
>    }
>    document.writeln("<TD>" + strNewItem + "</TD>");
>
> Of course this might be totally impossible given the fact
> that I'm not sure
> of your exact situation, but it may be a starter!
>
> Chris Blessing
> webguy at mail.rit.edu
> http://www.330i.net
>
> >I'm looking for a way to fill the remaining space in a table
> cell >with a
> >dotted line - using html/css.. any pointers much appreciated..
>
> >Rachel
>
> --
> For unsubscribe and other options, including
> the Tip Harvester and archive of thelist go to:
> http://lists.evolt.org Workers of the Web, evolt !




More information about the thelist mailing list