Loading ...
Sorry, an error occurred while loading the content.

Re: [NH] Dot Fill

Expand Messages
  • Harvey R. Savage
    ... Hello Ray, I don t know if there is a way to do this with html but, have you considered building a clip to work on the html file. The string below will
    Message 1 of 14 , Jul 16, 2001
    • 0 Attachment
      Ray Shapp wrote:
      >
      > Does anyone know how to specify dot fill for cells in a table in HTML?
      >
      > I have a two column table. The left column contains user name
      > left-justified. The right column contains user code number also
      > left-justified. The table is borderless by design. The left column is
      > fairly wide to accommodate long names and it would aid the eye if periods or
      > hyphens or some other symbol could be made to fill the cells in the left
      > column. Is there an attribute or other device in standard HTML to do this?
      >
      > Thanks for the help,
      >
      > Ray Shapp
      > Watchung, NJ
      >

      Hello Ray,

      I don't know if there is a way to do this with html but, have you
      considered building a clip to work on the html file.

      The string below will calculate the 'User Name' length and add
      fill characters up to a user definable "entire string length".
      All right columns will be vertically aligned unless you happen to
      use variable width fonts.

      A specific pattern to search the file for user names will
      probably be the most difficult obstacle.



      h="Pad User Name"
      ;^$DecToChar(45)$ is a dash - , ^$DecToChar(95)$ is a underscore
      _ , ^$DecToChar(95)$ is a midline dot
      ;
      ;Calculates 'User Name' length and pads line with ^!Strfill
      characters up to 30 characters.
      ;The number 30 can be adjusted to suit individual preference.
      ;
      ^!Set %username%=^$GetSelection$
      ;
      ^!Set
      %username%=^%username%^%Space%^$StrFill(^$DecToChar(183)$;^$Calc(30-(^$StrSize(^%username%)$))$)$
      ;
      ^%username%


      hrs
    • Ray Shapp
      Hi Harvey, I searched a textbook for a fill attribute in HTML but I couldn t find anything like it. Your clip looks promising. As for searching for user
      Message 2 of 14 , Jul 16, 2001
      • 0 Attachment
        Hi Harvey,

        I searched a textbook for a "fill" attribute in HTML but I couldn't find
        anything like it. Your clip looks promising. As for searching for user
        name, it can be defined to be all characters between <TD> and </TD> except
        if the table cell contains the character "@".

        I'll try the clip and let you know in private mail how it goes.

        Thank you for the help,

        Ray Shapp
        Watchung, NJ
      • Harvey R. Savage
        ... Ray, Glad to help. A couple of extra lines of code and you can probably reject those @ characters. I don t know the proper name for them, I just call
        Message 3 of 14 , Jul 16, 2001
        • 0 Attachment
          Ray Shapp wrote:
          >
          > Hi Harvey,
          >
          > I searched a textbook for a "fill" attribute in HTML but I couldn't find
          > anything like it. Your clip looks promising. As for searching for user
          > name, it can be defined to be all characters between <TD> and </TD> except
          > if the table cell contains the character "@".
          >
          > I'll try the clip and let you know in private mail how it goes.
          >
          > Thank you for the help,
          >
          > Ray Shapp
          > Watchung, NJ

          Ray,

          Glad to help. A couple of extra lines of code and you can
          probably reject those '@' characters. I don't know the proper
          name for them, I just call them 'at' or 'per' sign.

          hrs
        • Ray Shapp
          Jody and Harvey: Here s a sample from the table in which I d like to use dot fill (see below my signature). I m wondering if this can work when I m using a
          Message 4 of 14 , Jul 16, 2001
          • 0 Attachment
            Jody and Harvey:

            Here's a sample from the table in which I'd like to use dot fill (see below
            my signature). I'm wondering if this can work when I'm using a variable
            pitch font? Maybe by using three spaces before each dot, I could go back
            and manually edit any specific cells that look bad. The actual table
            contains only about 200 names.

            Also, I worry that various browsers or various local font settings will
            mangle the appearance I'm working so hard to improve. My current solution
            is to use a one-pixel border around all the cells in the table.

            What do you guys think -- will variable pitch, various browsers, and/or
            differing local fonts make this whole idea impractical?

            After you post your responses in public, I'd be glad to take any follow up
            to private mail.

            I really appreciate the time you've already spent thinking about this
            problem.

            Ray Shapp
            Watchung, NJ

            ********sample from table (addresses are all bogus)************
            <CENTER>
            <TABLE BORDER=0 cellspacing=2 WIDTH=460>

            <TR>
            <TD ALIGN="left" width="230"><FONT FACE="Arial,Helvetica" SIZE=3>
            <B>Adams, Hank   </font></B></TD>
            <TD ALIGN="LEFT" width="230"><FONT FACE="Arial,Helvetica" SIZE=3>
            <A HREF="mailto:ccdhanks@...">ccdhanks@...
            </A></font></TD></TR>
            <TR>
            <TD ALIGN="left">
            <B>Anderson, Anne   </B></CENTER></TD>
            <TD ALIGN="LEFT">
            <A HREF="mailto:uses@...">uses@...
            </A></TD></TR>
            <TR>
            <TD ALIGN="left">
            <B>Arcaro, Joe   </B></CENTER></TD>
            <TD ALIGN="LEFT">
            <A HREF="mailto:jbar@...">jbar@...
            </A></TD></TR>
            <TR>
            <TD ALIGN="left">
            <B>Ashcraft, Clif   </B></CENTER></TD>
            <TD ALIGN="LEFT">
            <A HREF="mailto:links3@...">links3@...
            </A></TD></TR>
            <TR>
            <TD ALIGN="left">
            <B>Augenstein, Wayne   </B></CENTER></TD>
            <TD ALIGN="LEFT">
            <A HREF="mailto:stag332@...">stag332@...
            </A></TD></TR>
            <TR>
            <TD ALIGN="left">
            <B>Batten, Maryanne   </B></CENTER></TD>
            <TD ALIGN="LEFT">
            <A HREF="mailto:maireb@...">maireb@...
            </A></TD></TR>
            <TR>
            <TD ALIGN="left">
            <B>Benton, Herb   </B></CENTER></TD>
            <TD ALIGN="LEFT">
            <A HREF="mailto:fiverivers@...">fiverivers@...
            </A></TD></TR>

            </TABLE>
          • Lotta
            Ray, ... Oh yes, I m afraid it absolutely would. Is the purpose that it should be easier for the eye to follow the line? In that case I think it looks
            Message 5 of 14 , Jul 16, 2001
            • 0 Attachment
              Ray,

              >Also, I worry that various browsers or various local font settings will
              >mangle the appearance I'm working so hard to improve.

              Oh yes, I'm afraid it absolutely would.

              Is the purpose that it should be easier for the eye to follow the line? In
              that case I think it looks perfectly OK as it is. Or you could consider
              using two different, light background colors, alternating them each TR. Or
              simply keep the borders on.

              The "filling" could probably be done with some kind of script, but with
              plain HTML I fear it would be messy. But then I'm not sure that I
              understand what you want to do - but I think I do. :)

              Lotta
            • Greg Chapman
              Hi Ray, ... I wasn t too positive in my last post, but Lotta s idea of alternating background colours to your TR tags is a good one. Take care, how you do it
              Message 6 of 14 , Jul 17, 2001
              • 0 Attachment
                Hi Ray,

                > Here's a sample from the table in which I'd like to use dot fill

                I wasn't too positive in my last post, but Lotta's idea of alternating
                background colours to your TR tags is a good one. Take care, how you do it
                though. Netscape Navigator is pretty appalling at handling tables!

                This post isn't really going to address the issue you raise, but it may
                provide food for thought for those are starting out with HTML and I'm sure
                I'll learn from any feedback too....

                It's always risky taking a portion of someone else's code but I was curious
                about yours. I pasted it into the middle of this code...

                ===============
                <HTML>
                <HEAD>
                <TITLE>Dummy</TITLE>
                </HEAD>

                <BODY>
                Your stuff pasted here
                </BODY>
                </HTML>
                ===============

                and ran it through HTML TIDY. It produced these warnings...

                ===============
                line 13 column 33 - Warning: replacing unexpected </font> by </b>
                line 13 column 40 - Warning: replacing unexpected </b> by </font>
                line 19 column 40 - Warning: missing </table> before </center>
                line 19 column 49 - Warning: </td> isn't allowed in <body> elements
                line 19 column 49 - Warning: inserting implicit <table>
                line 19 column 49 - Warning: discarding unexpected </td>
                line 20 column 1 - Warning: missing <tr>
                line 25 column 37 - Warning: discarding unexpected </center>
                line 31 column 40 - Warning: discarding unexpected </center>
                line 37 column 43 - Warning: discarding unexpected </center>
                line 43 column 42 - Warning: discarding unexpected </center>
                line 49 column 38 - Warning: discarding unexpected </center>
                You are recommended to use CSS to specify the font and
                properties such as its size and color. This will reduce
                the size of HTML files and make them easier maintain
                compared with using <FONT> elements.
                ===============

                Certainly those were some of the things I was concerned about, but it didn't
                answer the question about why you both set the TABLE WIDTH to 460 and each
                and every cell to 230. Much of this is redundant. You need only set the
                cell widths in one row and all the others will be forced to follow the same
                width. Indeed it is the very fact that you force the table to the width you
                do that you introduce the need for the "dot fill". Remove all the WIDTH
                attributes and let the table find its own width and your problem disappears.
                If you insist on seeing some dots, I suppose you could introduce a third,
                central, column and fill them all with the same number of dots?

                I realise that many of the   entities are probably there while you
                experiment with your "dot fill" methods, but they all appear redundant as
                well, as the code stands.

                Centering the whole table would be better done with an ALIGN attribute to
                the TABLE tag. It removes the need for a closing tag, too!

                Given the fact that you've forced the width relatively wide for the text
                each cell contains, and then left aligned all contents, the overall visual
                effect is that the text is set slightly to the left on the page. This
                effect could be minimised by using borders on the table. You also could
                have considered right aligning the contents of the first column, removing
                the need for the "dot fill", though I appreciate the format so loved by
                movie credit designers is not always so easy to browse through for specific
                information.

                > After you post your responses in public, I'd be glad to take any follow up
                > to private mail.

                Feel free to go private! :-)

                Greg
              • Lotta
                Hi guys, ... Actually no. Partly because align in TABLE works like align in IMAGE. That is, aligning the element relative other content, not absolutely on the
                Message 7 of 14 , Jul 17, 2001
                • 0 Attachment
                  Hi guys,

                  >Centering the whole table would be better done with an ALIGN attribute to
                  >the TABLE tag. It removes the need for a closing tag, too!

                  Actually no. Partly because align in TABLE works like align in IMAGE. That
                  is, aligning the element relative other content, not absolutely on the
                  page. align="center" should work this way though, but is known not to
                  always do so. Quoting Liam Quinn (his English is so much better than mine :) )
                  Since many browsers do not support ALIGN=center with TABLE,
                  authors may wish to place the TABLE within a CENTER element.

                  But I think this all is quite far from Ray's problem and I'm dead. Zzzzzzzz
                  Lotta
                • Scott Fordin
                  Instead of using a dot fill, why not just use alternating row colors in your table? True, some very old browsers can t handle table cell background colors, but
                  Message 8 of 14 , Jul 17, 2001
                  • 0 Attachment
                    Instead of using a dot fill, why not just use alternating row colors in
                    your table? True, some very old browsers can't handle table cell
                    background colors, but really, 90-95% of the browsers out there can handle
                    them just fine.

                    Scott

                    On Tue, 17 Jul 2001, Lotta wrote:

                    > From: Lotta <loro@...>
                    > To: ntb-html@yahoogroups.com
                    > Date: Tue, 17 Jul 2001 06:17:24 +0200
                    > Subject: Re: [NH] Dot Fill
                    >
                    > Ray,
                    >
                    > >Also, I worry that various browsers or various local font settings will
                    > >mangle the appearance I'm working so hard to improve.
                    >
                    > Oh yes, I'm afraid it absolutely would.
                    >
                    > Is the purpose that it should be easier for the eye to follow the line? In
                    > that case I think it looks perfectly OK as it is. Or you could consider
                    > using two different, light background colors, alternating them each TR. Or
                    > simply keep the borders on.
                    >
                    > The "filling" could probably be done with some kind of script, but with
                    > plain HTML I fear it would be messy. But then I'm not sure that I
                    > understand what you want to do - but I think I do. :)
                    >
                    > Lotta
                    >
                    >
                    >
                    >
                    >
                    > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
                    >
                    >
                  • Ray Shapp
                    Hi Lotta and Greg I intend to drop the idea of dot fill as being impractical. I like the idea of alternate background colors for successive rows except that I
                    Message 9 of 14 , Jul 17, 2001
                    • 0 Attachment
                      Hi Lotta and Greg

                      I intend to drop the idea of dot fill as being impractical. I like the idea
                      of alternate background colors for successive rows except that I often add
                      or subtract a name in the table. I'd have to develop a way to re-color the
                      table after each change. Can this sort of thing be done with a style sheet?

                      I have never had any success in getting Tidy to work.

                      Ray Shapp
                      Watchung, NJ
                    • Lotta
                      Ray, ... If you mean can the background colors be done with CSS - Yes. If you are saying that you want to delete a row and CSS would automatically change all
                      Message 10 of 14 , Jul 17, 2001
                      • 0 Attachment
                        Ray,

                        >I like the idea of alternate background colors for successive rows except
                        >that I often add
                        >or subtract a name in the table. I'd have to develop a way to re-color the
                        >table after each change. Can this sort of thing be done with a style sheet?

                        If you mean can the background colors be done with CSS - Yes.
                        If you are saying that you want to delete a row and CSS would automatically
                        change all the colors - no.
                        Again, some kind of script could probably do it but it can't be done
                        without that.

                        Either you use only HTML or HTML + CSS you need to in some way denote which
                        rows that should have which color. If you yank one row out you have to
                        rewrite the color attributes for the whole table. I guess this could be a
                        job for NTB . Give a certain attribute to every other TR and another one to
                        the rest. Get Jody on it! :)

                        Lotta
                      • Lotta
                        Ray, ... Come to think of it, that could just as easily be done with Find and Replace even for a large document. It s after all only a matter of (after the
                        Message 11 of 14 , Jul 17, 2001
                        • 0 Attachment
                          Ray,

                          >If you yank one row out you have to
                          >rewrite the color attributes for the whole table.

                          Come to think of it, that could just as easily be done with Find and
                          Replace even for a large document. It's after all only a matter of (after
                          the deleted or added row) changing all attribute A to attribute B and vice
                          versa, isn't it?

                          Lotta



                          [Non-text portions of this message have been removed]
                        • Ray Shapp
                          Lotta, You said Come to think of it, that could just as easily be done with Find and Replace even for a large document. It s after all only a matter of
                          Message 12 of 14 , Jul 17, 2001
                          • 0 Attachment
                            Lotta,

                            You said>>>>
                            Come to think of it, that could just as easily be done with Find and
                            Replace even for a large document. It's after all only a matter of (after
                            the deleted or added row) changing all attribute A to attribute B and vice
                            versa, isn't it?<<<<<<

                            I don't think so. Let's say I use a white background for all odd numbered
                            rows and a gray background for all even numbered rows. Now I remove row two
                            and add a row between the old row 50 and 51. Color reversals will be
                            necessary for new row two through 51 but all others should retain their
                            original color. If more than a few additions and deletions are done in a
                            session, it could become quite tedious.

                            Find and replace, however may do the trick as follows. I could change all
                            background attributes to white ("ffffff"). Then use a Regex to find and
                            replace both instances of bgcolor="ffffff" to bgcolor="D3D3D3" in every even
                            numbered row.

                            The sample below my signature shows my desired end point. Will anyone help
                            me write the Regex that will ignore without change everything between the
                            first instance of <TR> (anything) </TR> and in the second instance of <TR>
                            (anything) </TR>, replace both copies of "ffffff" with "D3D3D3" then repeat
                            the pattern?

                            Ray Shapp
                            Watchung, NJ

                            <CENTER>
                            <TABLE BORDER=0 cellspacing=0 WIDTH=460>

                            <TR>
                            <TD ALIGN="left" width="230" bgcolor="ffffff"><FONT FACE="Arial,Helvetica"
                            SIZE=3>
                            <B>Adams, Joe   </font></B></TD>
                            <TD ALIGN="LEFT" width="230" bgcolor="ffffff"><FONT FACE="Arial,Helvetica"
                            SIZE=3>
                            <A HREF="mailto:ccdhanks@...">ccdhanks@...
                            </A></font></TD></TR>
                            <TR>
                            <TD ALIGN="left" bgcolor="D3D3D3">
                            <B>Anderson, Frank   </B></CENTER></TD>
                            <TD ALIGN="LEFT" bgcolor="D3D3D3">
                            <A HREF="mailto:uses@...">uses@...
                            </A></TD></TR>
                            <TR>
                            <TD ALIGN="left" bgcolor="ffffff">
                            <B>Arcaro, Bill   </B></CENTER></TD>
                            <TD ALIGN="LEFT" bgcolor="ffffff">
                            <A HREF="mailto:jbar@...">jbar@...
                            </A></TD></TR>
                            <TR>
                            <TD ALIGN="left" bgcolor="D3D3D3">
                            <B>Ashcraft, Anaconda George   </B></CENTER></TD>
                            <TD ALIGN="LEFT" bgcolor="D3D3D3">
                            <A HREF="mailto:links3@...">links3@...
                            </A></TD></TR>

                            </TABLE>
                          • Lotta
                            Good morning Ray, ... Ah, I though that you were going to change only one or two names at the time. Just a tip for you. Either you do the colors in HTML or
                            Message 13 of 14 , Jul 18, 2001
                            • 0 Attachment
                              Good morning Ray,

                              >>Come to think of it, that could just as easily be done with Find and
                              >>Replace
                              >
                              >I don't think so. Let's say I use a white background for all odd numbered
                              >rows and a gray background for all even numbered rows. Now I remove row two
                              >and add a row between the old row 50 and 51. Color reversals will be
                              >necessary for new row two through 51 but all others should retain their
                              >original color. If more than a few additions and deletions are done in a
                              >session, it could become quite tedious.
                              >
                              >Find and replace, however may do the trick as follows. I could change all
                              >background attributes to white ("ffffff"). Then use a Regex to find and
                              >replace both instances of bgcolor="ffffff" to bgcolor="D3D3D3" in every even
                              >numbered row.


                              Ah, I though that you were going to change only one or two names at the time.

                              Just a tip for you. Either you do the colors in HTML or CSS you don't need
                              to specify them for each cell. Works with rows as well. You get less code
                              and the switching becomes easier whatever method you choose.

                              I would consider using CSS for both colors and fonts. Not even NS4x
                              browsers have problems with this and the code becomes so much cleaner and
                              easier to handle. But then I don't know if you want to use CSS.

                              Lotta
                            • Yehuda Katz
                              Just a practical thought... When I see all the time, brain attributes, bandwidth etc. devoted for this dots issue, I wonder if it would not be MUCH simpler to
                              Message 14 of 14 , Jul 18, 2001
                              • 0 Attachment
                                Just a practical thought...
                                When I see all the time, brain attributes, bandwidth etc. devoted for this
                                dots issue, I wonder if it would not be MUCH simpler to add the dots
                                manually. You do it for the whole list only once (maybe 1 hour work for 200
                                items), then you can remove any item without hard feelings. Of course, when
                                you add a new entry, you will have to add to it those 3-or-so dots.

                                Yehuda
                                _________________________________________________________________________
                                Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com
                              Your message has been successfully submitted and would be delivered to recipients shortly.