tables without spaces

Discussion in 'HTML' started by Faux_Pseudo, Aug 3, 2005.

  1. Faux_Pseudo

    Faux_Pseudo Guest

    I am trying to create a table where the second row lines up with the
    first withou any spacing between:

    <table style="width: 100%; text-align: left;" border="0"
    cellpadding="0"><tbody><tr><td cellpadding="0"
    style="vertical-align: top;" colspan=2><tt><h3><pre>
    (( //
    ( ) ( )</td></tr>
    <tr><td valign=top cellpadding="0">
    <h3><pre>||/<a href="foo.html">___/fauxascii.com/</a>_________|
    ||/<a href="foo.html/">____/abcef/</a>________________|
    ||/<a href="bar.html">_____/abcdefgh/</a>____________|
    `=___________________________='
    </td></tr></tbody></table>

    In elinks (my main browser) this works fine and we see:

    (( //
    ( ) ( )
    ||/___/fauxascii.com/_________|
    ||/____/abcef/________________|
    ||/_____/abcdefgh/____________|
    `=___________________________='

    But in firefox (and who knows what it looks like in IE) we see this:

    (( //
    ( ) ( )


    ||/___/fauxascii.com/_________|
    ||/____/abcef/________________|
    ||/_____/abcdefgh/____________|
    `=___________________________='

    Does anyone know of a way to get it to display like the first example?
     
    Faux_Pseudo, Aug 3, 2005
    #1
    1. Advertisements

  2. Faux_Pseudo

    Nik Coughin Guest

    (snip)

    Firstly, your html is hideously malformed. Closing tags missing etc. This
    is probably happening because you didn't close the first <pre> tag so it is
    inserting line breaks from further in your code into your page (because it
    thinks you still want to preserve white space as you haven't closed the tag
    yet). You are getting different results in different browsers because they
    each handle malformed code differently.

    Secondly, why on Earth are you marking this up as a table? It's a strange
    use of a table if you ask me, especially as you could have just done:

    <pre>
    (( //
    ( ) ( )
    `=___________________________='
    </pre>

    Which works perfectly in Firefox, IE, etc.
     
    Nik Coughin, Aug 3, 2005
    #2
    1. Advertisements

  3. Faux_Pseudo

    Faux_Pseudo Guest

    _.-In alt.html, Nik Coughin wrote the following -._
    Because I am creating an ascii-art layout for the pages that will look
    something like this:

    _______________________________________________________
    /_________________________ ________________ ___________ )______
    // ____ ____ )) )) //_______ )
    // | __) | _ \ (( Ascii // // \\
    // () | |__ | |_) | () \\ Photo (( Linux (( Site News\\
    (( | __) | __/ )) Beer_Plants )) Porto \\ ))
    \\ () | | ____ | | () // Mushrooms // Food )) //
    )) |_| (____)|_| ((_____________// //________//
    // )) ( :F_P: ( __________)
    // // \__________)
    (( ((
    ( ) ( )
    ||/___/fauxascii.com/________|| Page body.
    ||/____/photo/_______________||
    ||/_____/cemetery/___________||
    ||/______across_from_elmwood/||
    ||/______elmwood/____________||
    ||/______new_york/___________||
    ||/______newtown-rd/_________||
    `=___________________________='

    Everything "Page body" will be more or less the same on each page.
    Everything to the left of it will fluctuate based on the current
    possition on the site. In the area of "Page body" will be the actual
    content for the page.
    The only way I can see to script this for automated updates is via a table.

    <table><tr><td><pre>
    .----------------.
    | banner |
    |----------------|</pre></td></tr><tr><td><pre>
    |links| body |
    | \_________!___insert a </pre></td><td><pre> there
    | | |
    `----------------'</pre></td></tr></table>

    But for the banner to line up with the link there has to be no spacing.
    Which, as mentioned, works find in a text browser but doesn't want to
    work in Firefox.
     
    Faux_Pseudo, Aug 3, 2005
    #3
  4. Faux_Pseudo

    dorayme Guest

    You are a genius. Seriously! I admire anyone who can do this ascii art stuff
    so well. I just want you to know this right now. Also an excellent
    motivating factor for becoming an expert in tables! We will all come to you
    with table questions after you have sorted this out...

    dorayme
     
    dorayme, Aug 3, 2005
    #4
  5. Faux_Pseudo

    Faux_Pseudo Guest

    _.-In alt.html, dorayme wrote the following -._
    If you or anyone else knows of a better way to accomplish what I want
    to do then please let me know. Tables are what I know so that is what
    I have been building this on.
     
    Faux_Pseudo, Aug 4, 2005
    #5
  6. Faux_Pseudo

    Nik Coughin Guest

    I like what you are doing, I have a fondness for ascii. If I get some time
    I will have a play and post back here with the results.
     
    Nik Coughin, Aug 4, 2005
    #6
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.