Skip navigation
Currently Being Moderated

Background with multiple vertical lines

May 6, 2012 10:18 AM

How do I accomplish a background with multiple vertical lines (and also very limited text) in a .htm file?  Here is the example:

 

BackAusw_Lines.jpg

 

The background image is fixed position so it will not scroll.

 

The example shown was created using PowerPoint, using a textured background, then drawing vertical lines.  I then created a narrow horizontal stripe (without the lines) and put the numbers over it so the lines would not run through the numbers.

 

The problem is that the x-positioning of the vertical lines is very crude (as you can see) and I want it precise.  How could I do this using CSS?  In searching the web I find examples of people saying use tables or borders for vertical lines.  I don't think it is practical here.  The webpages (there are over 100 of them) are thousands of lines long. 

 

The vertical lines and numbers are helpful to the visitor following genealogy information with varying degrees of indenting.  But I want the lines to line up with the indenting.

 

Alternatively if there is a way I can create the image with precision using a free application and then save it as a .jpg, I could solve the problem that way.  Just don't know of such an application.

 

Thanks for your help.

 
Replies
  • Currently Being Moderated
    May 6, 2012 11:00 AM   in reply to jds zigzag

    Hello Jim,

     

    "use tables" it's not perfectly a solution which you will give priority, but let's talk about it. I can show you this:

     

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Tabellen mit definierter Höhe und Breite</title>
    </head>

    <body>
    <table border="1" cellspacing="0" cellpadding="0" width="100%">
      <tr>
        <td width="2%" height="250" valign="top"><p> </p></td>
        <td width="2%" valign="top"><p> </p></td>
        <td width="2%" valign="top"><p> </p></td>
        <td width="2%" valign="top"><p> </p></td>
        <td width="2%" valign="top"><p> </p></td>
        <td width="2%" valign="top"><p> </p></td>
        <td width="2%" valign="top"><p> </p></td>
        <td width="2%" valign="top"><p> </p></td>
        <td width="2%" valign="top"><p> </p></td>
        <td width="2%" valign="top"><p> </p></td>
        <td width="2%" valign="top"><p> </p></td>
        <td width="2%" valign="top"><p> </p></td>
        <td width="2%" valign="top"><p> </p></td>
        <td width="2%" valign="top"><p> </p></td>
        <td width="2%" valign="top"><p> </p></td>
        <td width="2%" valign="top"><p> </p></td>
        <td width="2%" valign="top"><p> </p></td>
        <td width="2%" valign="top"><p> </p></td>
        <td width="2%" valign="top"><p> </p></td>
        <td width="2%" valign="top"><p> </p></td>
        <td width="2%" valign="top"><p> </p></td>
        <td width="2%" valign="top"><p> </p></td>
        <td width="2%" valign="top"><p> </p></td>
        <td width="2%" valign="top"><p> </p></td>
        <td width="2%" valign="top"><p> </p></td>
        <td width="2%" valign="top"><p> </p></td>
        <td width="2%" valign="top"><p> </p></td>
        <td width="2%" valign="top"><p> </p></td>
        <td width="2%" valign="top"><p> </p></td>
        <td width="2%" valign="top"><p> </p></td>
        <td width="2%" valign="top"><p> </p></td>
        <td width="2%" valign="top"><p> </p></td>
        <td width="2%" valign="top"><p> </p></td>
        <td width="2%" valign="top"><p> </p></td>
        <td width="2%" valign="top"><p> </p></td>
        <td width="2%" valign="top"><p> </p></td>
        <td width="2%" valign="top"><p> </p></td>
        <td width="2%" valign="top"><p> </p></td>
        <td width="2%" valign="top"><p> </p></td>
        <td width="2%" valign="top"><p> </p></td>
        <td width="2%" valign="top"><p> </p></td>
        <td width="2%" valign="top"><p> </p></td>
      </tr>
      <tr>
        <td width="4%" colspan="2" valign="top"><p align="center">3</p></td>
        <td width="4%" colspan="2"><p align="center">5</p></td>
        <td width="4%" colspan="2" valign="top"><p align="center">7</p></td>
        <td width="4%" colspan="2" valign="top"><p align="center">9</p></td>
        <td width="4%" colspan="2" valign="top"><p align="center">11</p></td>
        <td width="4%" colspan="2" valign="top"><p align="center">13</p></td>
        <td width="4%" colspan="2" valign="top"><p align="center">15</p></td>
        <td width="4%" colspan="2" valign="top"><p align="center">17</p></td>
        <td width="4%" colspan="2" valign="top"><p align="center">19</p></td>
        <td width="4%" colspan="2" valign="top"><p align="center">21</p></td>
        <td width="4%" colspan="2" valign="top"><p align="center">23</p></td>
        <td width="4%" colspan="2" valign="top"><p align="center">25</p></td>
        <td width="4%" colspan="2" valign="top"><p align="center">27</p></td>
        <td width="4%" colspan="2" valign="top"><p align="center">29</p></td>
        <td width="4%" colspan="2" valign="top"><p align="center">31</p></td>
        <td width="4%" colspan="2" valign="top"><p align="center">33</p></td>
        <td width="4%" colspan="2" valign="top"><p align="center">35</p></td>
        <td width="4%" colspan="2" valign="top"><p align="center">37</p></td>
        <td width="4%" colspan="2" valign="top"><p align="center">39</p></td>
        <td width="4%" colspan="2" valign="top"><p align="center">41</p></td>
        <td width="4%" colspan="2" valign="top"><p align="center">43</p></td>
      </tr>
      <tr>
        <td width="2%" height="250" valign="top"><p> </p></td>
        <td width="2%" height="250" valign="top"><p> </p></td>
        <td width="2%" height="250" valign="top"><p> </p></td>
        <td width="2%" height="250" valign="top"><p> </p></td>
        <td width="2%" height="250" valign="top"><p> </p></td>
        <td width="2%" height="250" valign="top"><p> </p></td>
        <td width="2%" height="250" valign="top"><p> </p></td>
        <td width="2%" height="250" valign="top"><p> </p></td>
        <td width="2%" height="250" valign="top"><p> </p></td>
        <td width="2%" height="250" valign="top"><p> </p></td>
        <td width="2%" height="250" valign="top"><p> </p></td>
        <td width="2%" height="250" valign="top"><p> </p></td>
        <td width="2%" height="250" valign="top"><p> </p></td>
        <td width="2%" height="250" valign="top"><p> </p></td>
        <td width="2%" height="250" valign="top"><p> </p></td>
        <td width="2%" height="250" valign="top"><p> </p></td>
        <td width="2%" height="250" valign="top"><p> </p></td>
        <td width="2%" height="250" valign="top"><p> </p></td>
        <td width="2%" height="250" valign="top"><p> </p></td>
        <td width="2%" height="250" valign="top"><p> </p></td>
        <td width="2%" height="250" valign="top"><p> </p></td>
        <td width="2%" height="250" valign="top"><p> </p></td>
        <td width="2%" height="250" valign="top"><p> </p></td>
        <td width="2%" height="250" valign="top"><p> </p></td>
        <td width="2%" height="250" valign="top"><p> </p></td>
        <td width="2%" height="250" valign="top"><p> </p></td>
        <td width="2%" height="250" valign="top"><p> </p></td>
        <td width="2%" height="250" valign="top"><p> </p></td>
        <td width="2%" height="250" valign="top"><p> </p></td>
        <td width="2%" height="250" valign="top"><p> </p></td>
        <td width="2%" height="250" valign="top"><p> </p></td>
        <td width="2%" height="250" valign="top"><p> </p></td>
        <td width="2%" height="250" valign="top"><p> </p></td>
        <td width="2%" height="250" valign="top"><p> </p></td>
        <td width="2%" height="250" valign="top"><p> </p></td>
        <td width="2%" height="250" valign="top"><p> </p></td>
        <td width="2%" height="250" valign="top"><p> </p></td>
        <td width="2%" height="250" valign="top"><p> </p></td>
        <td width="2%" height="250" valign="top"><p> </p></td>
        <td width="2%" height="250" valign="top"><p> </p></td>
        <td width="2%" height="250" valign="top"><p> </p></td>
        <td width="2%" height="250" valign="top"><p> </p></td>
      </tr>
    </table>
    </body>
    </html>

     

    Let's see us again!

    Hans-Günter

     
    |
    Mark as:
  • Currently Being Moderated
    May 6, 2012 3:26 PM   in reply to jds zigzag

    Your design concept is flawed. Trying to align text over a background image with pixel perfect precision is impossible   It's like trying to nail Jell-O to the ceiling.  It won't stick.   You can't control which browser settings and text sizes people use.  So while you may get it to temporarily look right on your system, it will never be exactly the same for everyone.

     

    Hans suggestion of using a table is probably the best you can do.

     

     

     

    Nancy O.

    Alt-Web Design & Publishing

    Web | Graphics | Print | Media  Specialists 

    http://alt-web.com/

    http://twitter.com/altweb

    http://alt-web.blogspot.com/

     
    |
    Mark as:
  • Currently Being Moderated
    May 7, 2012 11:00 AM   in reply to jds zigzag

    For something like this on the web, it just makes more sense to use tables.  See screenshot.

     

    tables-2.jpg

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    <html xmlns="http://www.w3.org/1999/xhtml">

    <head>

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

    <title>Tables</title>

     

    <style type="text/css">

     

    body {background:#FFFFCC;}

     

    table {

    padding:0 150px 0 12px;

    color:#663300;

    width: 400px;

    border-bottom:3px solid #993300;

    border-collapse::collapse;

    }

     

    tr,td {

    border-right: 1px dotted #996600;

    height: 45px;

    width: 50px}

     

    td {width:50px; font-size: 11px;}

     

    tr.bottom {

    vertical-align:bottom;

    text-align:right;

    color: #336699;

    font-size:14px;

    font-weight:bold;}

     

    </style>

    </head>

     

    <body>

    <table cellpadding="5" cellspacing="0">

    <tr>

    <th colspan="10">Table heading</th>

    </tr>

    <tr>

        <td>some text</td>

        <td>some text</td>

        <td>some text</td>

        <td>some text</td>

        <td>some text</td>

        <td>some text</td>

        <td>some text</td>

        <td>some text</td>

        <td>some text</td>

        <td>some text</td>

    </tr>

    <tr>

        <td>some text</td>

        <td>some text</td>

        <td>some text</td>

        <td>some text</td>

        <td>some text</td>

        <td>some text</td>

        <td>some text</td>

        <td>some text</td>

        <td>some text</td>

        <td>some text</td>

    </tr>

    <tr class="bottom">

        <td>50</td>

        <td>100</td>

        <td>150</td>

        <td>200</td>

        <td>250</td>

        <td>300</td>

        <td>350</td>

        <td>400</td>

        <td>450</td>

        <td>500</td>

    </tr>

    </table>

    <table cellpadding="5" cellspacing="0">

    <tr>

    <th colspan="10">Table heading</th>

    </tr>

    <tr>

        <td>some text</td>

        <td>some text</td>

        <td>some text</td>

        <td>some text</td>

        <td>some text</td>

        <td>some text</td>

        <td>some text</td>

        <td>some text</td>

        <td>some text</td>

        <td>some text</td>

    </tr>

    <tr>

        <td>some text</td>

        <td>some text</td>

        <td>some text</td>

        <td>some text</td>

        <td>some text</td>

        <td>some text</td>

        <td>some text</td>

        <td>some text</td>

        <td>some text</td>

        <td>some text</td>

    </tr>

    <tr class="bottom">

        <td>50</td>

        <td>100</td>

        <td>150</td>

        <td>200</td>

        <td>250</td>

        <td>300</td>

        <td>350</td>

        <td>400</td>

        <td>450</td>

        <td>500</td>

    </tr>

    </table>

    </body>

    </html>

     

     

    Nancy O.

    Alt-Web Design & Publishing

    Web | Graphics | Print | Media  Specialists 

    http://alt-web.com/

    http://twitter.com/altweb

    http://alt-web.blogspot.com/

     
    |
    Mark as:
  • Currently Being Moderated
    May 7, 2012 1:07 PM   in reply to jds zigzag

    Hello Jim,

     

    may I complete Nancy's answer. Looking to your screenshot above, I note that you want to group two columns to a single one. That's what I considered in my suggestion. To make it more clear here a screenshot where I filled some columns with text:

     

     

    drSpalten.jpg

     

    here I my modified source code:

     

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Tabellen mit definierter Höhe und Breite</title>
    </head>

    <body>
    <table border="1" cellspacing="0" cellpadding="0" width="100%">
      <tr>
        <td width="2%" height="250" valign="top"><p>some</p>
        <p>text(3a)</p></td>
        <td width="2%" valign="top"><p>some</p>
        <p>text(3b)</p></td>
        <td width="2%" valign="top"><p>some</p>
        <p>text(5a)</p></td>
        <td width="2%" valign="top"><p>some</p>
        <p>text(5b)</p></td>
        <td width="2%" valign="top"><p>some</p>
        <p>text(7a)</p></td>
        <td width="2%" valign="top"><p>some</p>
        <p>text(7b)</p></td>
        <td width="2%" valign="top"><p>aso</p></td>
        <td width="2%" valign="top"><p>aso</p></td>
        <td width="2%" valign="top"><p>aso</p></td>
        <td width="2%" valign="top"><p>aso</p></td>
        <td width="2%" valign="top"><p> </p></td>
        <td width="2%" valign="top"><p> </p></td>
        <td width="2%" valign="top"><p> </p></td>
        <td width="2%" valign="top"><p> </p></td>
        <td width="2%" valign="top"><p> </p></td>
        <td width="2%" valign="top"><p> </p></td>
        <td width="2%" valign="top"><p> </p></td>
        <td width="2%" valign="top"><p> </p></td>
        <td width="2%" valign="top"><p> </p></td>
        <td width="2%" valign="top"><p> </p></td>
        <td width="2%" valign="top"><p> </p></td>
        <td width="2%" valign="top"><p> </p></td>
        <td width="2%" valign="top"><p> </p></td>
        <td width="2%" valign="top"><p> </p></td>
        <td width="2%" valign="top"><p> </p></td>
        <td width="2%" valign="top"><p> </p></td>
        <td width="2%" valign="top"><p> </p></td>
        <td width="2%" valign="top"><p> </p></td>
        <td width="2%" valign="top"><p> </p></td>
        <td width="2%" valign="top"><p> </p></td>
        <td width="2%" valign="top"><p> </p></td>
        <td width="2%" valign="top"><p> </p></td>
        <td width="2%" valign="top"><p> </p></td>
        <td width="2%" valign="top"><p> </p></td>
        <td width="2%" valign="top"><p> </p></td>
        <td width="2%" valign="top"><p> </p></td>
        <td width="2%" valign="top"><p> </p></td>
        <td width="2%" valign="top"><p> </p></td>
        <td width="2%" valign="top"><p> </p></td>
        <td width="2%" valign="top"><p> </p></td>
        <td width="2%" valign="top"><p> </p></td>
        <td width="2%" valign="top"><p> </p></td>
      </tr>
      <tr>
        <td width="4%" colspan="2" valign="top"><p align="center">3</p></td>
        <td width="4%" colspan="2"><p align="center">5</p></td>
        <td width="4%" colspan="2" valign="top"><p align="center">7</p></td>
        <td width="4%" colspan="2" valign="top"><p align="center">9</p></td>
        <td width="4%" colspan="2" valign="top"><p align="center">11</p></td>
        <td width="4%" colspan="2" valign="top"><p align="center">13</p></td>
        <td width="4%" colspan="2" valign="top"><p align="center">15</p></td>
        <td width="4%" colspan="2" valign="top"><p align="center">17</p></td>
        <td width="4%" colspan="2" valign="top"><p align="center">19</p></td>
        <td width="4%" colspan="2" valign="top"><p align="center">21</p></td>
        <td width="4%" colspan="2" valign="top"><p align="center">23</p></td>
        <td width="4%" colspan="2" valign="top"><p align="center">25</p></td>
        <td width="4%" colspan="2" valign="top"><p align="center">27</p></td>
        <td width="4%" colspan="2" valign="top"><p align="center">29</p></td>
        <td width="4%" colspan="2" valign="top"><p align="center">31</p></td>
        <td width="4%" colspan="2" valign="top"><p align="center">33</p></td>
        <td width="4%" colspan="2" valign="top"><p align="center">35</p></td>
        <td width="4%" colspan="2" valign="top"><p align="center">37</p></td>
        <td width="4%" colspan="2" valign="top"><p align="center">39</p></td>
        <td width="4%" colspan="2" valign="top"><p align="center">41</p></td>
        <td width="4%" colspan="2" valign="top"><p align="center">43</p></td>
      </tr>
      <tr>
        <td width="2%" height="250" valign="top"><p>some</p>
        <p>text(3c)</p></td>
        <td width="2%" height="250" valign="top"><p>some</p>
        <p>text(3d)</p></td>
        <td width="2%" height="250" valign="top"><p>some</p>
        <p>text(5c)</p></td>
        <td width="2%" height="250" valign="top"><p>some</p>
        <p>text(5d)</p></td>
        <td width="2%" height="250" valign="top"><p>some</p>
        <p>text(7c)</p></td>
        <td width="2%" height="250" valign="top"><p>some</p>
        <p>text(7d)</p></td>
        <td width="2%" height="250" valign="top"><p>aso</p></td>
        <td width="2%" height="250" valign="top"><p>aso</p></td>
        <td width="2%" height="250" valign="top"><p>aso</p></td>
        <td width="2%" height="250" valign="top"><p>aso</p></td>
        <td width="2%" height="250" valign="top"><p> </p></td>
        <td width="2%" height="250" valign="top"><p> </p></td>
        <td width="2%" height="250" valign="top"><p> </p></td>
        <td width="2%" height="250" valign="top"><p> </p></td>
        <td width="2%" height="250" valign="top"><p> </p></td>
        <td width="2%" height="250" valign="top"><p> </p></td>
        <td width="2%" height="250" valign="top"><p> </p></td>
        <td width="2%" height="250" valign="top"><p> </p></td>
        <td width="2%" height="250" valign="top"><p> </p></td>
        <td width="2%" height="250" valign="top"><p> </p></td>
        <td width="2%" height="250" valign="top"><p> </p></td>
        <td width="2%" height="250" valign="top"><p> </p></td>
        <td width="2%" height="250" valign="top"><p> </p></td>
        <td width="2%" height="250" valign="top"><p> </p></td>
        <td width="2%" height="250" valign="top"><p> </p></td>
        <td width="2%" height="250" valign="top"><p> </p></td>
        <td width="2%" height="250" valign="top"><p> </p></td>
        <td width="2%" height="250" valign="top"><p> </p></td>
        <td width="2%" height="250" valign="top"><p> </p></td>
        <td width="2%" height="250" valign="top"><p> </p></td>
        <td width="2%" height="250" valign="top"><p> </p></td>
        <td width="2%" height="250" valign="top"><p> </p></td>
        <td width="2%" height="250" valign="top"><p> </p></td>
        <td width="2%" height="250" valign="top"><p> </p></td>
        <td width="2%" height="250" valign="top"><p> </p></td>
        <td width="2%" height="250" valign="top"><p> </p></td>
        <td width="2%" height="250" valign="top"><p> </p></td>
        <td width="2%" height="250" valign="top"><p> </p></td>
        <td width="2%" height="250" valign="top"><p> </p></td>
        <td width="2%" height="250" valign="top"><p> </p></td>
        <td width="2%" height="250" valign="top"><p> </p></td>
        <td width="2%" height="250" valign="top"><p> </p></td>
      </tr>
    </table>
    </body>
    </html>

     

    Hans-Günter

     

    P.S.

    Couldn't answer earlier because of Adobes Forum Update.

     
    |
    Mark as:
  • Currently Being Moderated
    May 7, 2012 4:47 PM   in reply to jds zigzag

    By default, background images don't print from browsers.  So that idea may fizzle.  But now that we understand what you're trying to do,  I think you just need to run with it and experiment a little. 

     

    Make a basic page with your background-image and use definition lists for your content.

    http://www.maxdesign.com.au/articles/definition/


    Test in all browsers/devices with various settings.  It should work OK.

     

     

    Nancy O.

    Alt-Web Design & Publishing

    Web | Graphics | Print | Media  Specialists 

    http://alt-web.com/

    http://twitter.com/altweb

    http://alt-web.blogspot.com/

     
    |
    Mark as:
  • Currently Being Moderated
    May 7, 2012 6:11 PM   in reply to jds zigzag

    Hallo Jim, ach sooo!

     

    Here it's bedtime long ago BUT now I for my part wanted to find (in addition to Nancy) a possible solution within DW. In doing so, I casually discovered "white-space" and its various parameters. The result was:

     

     

    drSpalten.jpg

     

     

     

    You can have a look here: http://hansgd.de/AdobTest/Tabulator/TabulatorNur.php.

     

    The advantage of this solution is in my eyes that you can position the distances very accurately with the spacebar.

     

    Good luck!

    Hans-Günter

     
    |
    Mark as:
  • Currently Being Moderated
    May 7, 2012 6:13 PM   in reply to jds zigzag

    Hi Jim,

     

    and in addition, here is the code:

     

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">

    <html><head><title>white-space</title>

    <style type="text/css">

    #editor      { white-space:pre; }

    body {

    background-image: url(TabSpalten.jpg);

    background-repeat: no-repeat;

    }

    </style>

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">

    </head>

    <body>

     

    <p id="editor">

       

        The paragraph you are reading here,

             was defined as pre-defined.

             

                 Line breaks should be interpreted in such a manner

                    as you entered them in the code view editor.

       

        Der Absatz, den Sie gerade lesen,

             wurde als predefiniert definiert.

             

                 Zeilenumbrüche sollten dabei so interpretiert

                    werden, wie sie in der Code-Ansicht eingegeben wurden.</p>

     

    </body>

    </html>

     

    Hans-Günter

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points