HTML help

CBCB Ƹ̵̡Ӝ̵̨̄ƷDer Millionendorf- Icrontian
edited December 2003 in Internet & Media
I've been writing HTML from scratch for a long time. So have GH and Zan. But, the combined knowledge of the three of us can't find me an answer to this one:

I want tabs.

That's it...

I've got some text that goes into a table cell, and I want to put a little bit of space at the beginning of some of the lines (without adding more cells to the table).

Why is there no nuxing 'tab' tag?! Why?! Why?!

/me exhales finally.

Comments

  • qparadoxqparadox Vancouver, BC
    edited December 2003
    lots and lots of   (non-breaking space)! :P its your friend, really!. Its a crude hack but its the best way I know to do it in pure html. Anyone else got a cleaner suggestion?

    You could also try adding padding to the table cells. From what I remember this is a nightmare and is interpreted by various browsers differently. I know in CSS you can specify the padding / margin etc for each side of a bounding box (different than a table cell) but I can't remember what's allowed in good-ol tables and what actually works in all browsers (I'm a CSS man now ;)). .

    *edit again

    I had some fun and put a tab in word and checked the source, here's what does a tab apparently.
    < body lang=EN-US style='tab-interval:.5in' > (change in global body tag)

    < p class=MsoNormal > < span style='mso-tab-count:1' > < /span > test < /p >

    where p.MsoNormal is defined as:

    p.MsoNormal
    {mso-style-parent:"";
    margin:0in;
    margin-bottom:.0001pt;
    mso-pagination:widow-orphan;
    font-size:12.0pt;
    font-family:"Times New Roman";
    mso-fareast-font-family:"Times New Roman";}

    Obviously most of this is crap bloat-code, but you can play around within some CSS code like this and maybe make it a little nicer. CSS and tables sometimes don't play well in certain browsers though so beware.

    *edit 3

    just thought of something else, depending on the data you could make each column into two columns and do a colspan=2 for the unindented and then no colspan for the indented ones. Again its crude ... but html is _always_ crude
  • t1rhinot1rhino Toronto
    edited December 2003
    You can also use the
    & n b s p
    
    to insert spaces. :)
    Remove the spaces between the letters. I had to add them or it would not show up.
  • KwitkoKwitko Sheriff of Banning (Retired) By the thing near the stuff Icrontian
    edited December 2003
    "tab-interval" is some ugly MS-only nonsense. To add a tab to a cell, you could use CSS. Add the following into the cell you want to have the tab in:
    &lt;td style="padding-left: 10px">
    

    Or however far you want to tab over. You can also use "em" which is a space equivalent to the height of the font being used.

    See my rather rudimentary example over at www.kwitko.net/test.html.

    T1, if you ever want to show something like that in a post, use &ampamp;. So in your case you would write "&amp;nbsp;" Err... on second thought, just add the spaces. :)
  • CBCB Ƹ̵̡Ӝ̵̨̄Ʒ Der Millionendorf- Icrontian
    edited December 2003
    YES!

    nbsp is the solution that I needed. Now that you tell me, I can slap myself in the head for not remembering it from last time I had this problem...

    Thanks guys.
  • Straight_ManStraight_Man Geeky, in my own way Naples, FL Icrontian
    edited December 2003
    Other thing is the lo and li subtags with subentries of bulleted text, with bullets. Most browsers tab between bullets and first text character at least two-three non-breaking spaces worth. If I want a line between bulleted parts of a list I will use a paragraph bracket pair around each list item entry, and avoid DIVs inside list structure. www.w3c.org has some good examples. Lists can work in tables, if you make the table cell flex vertically or horizontally with percentage entries and the "whatever works * character" used appropoishly instead of absolutes. Old way, works in both desktop publishing (different format codes, same structural idea) and HTML purist methods.

    To get height flexing, height of cell you want to flex is *, and cell\table overall width and border can be percentages. To get width flex, move * to width position and percentages to vertical. I like floating tables that stretch vertical most of time, some folks still use smaller than a 1024x768 true view pane size in browser.

    Table on background gets you an implicit single layer on layer effect, and if you want transparent cells use noborder and a transparency as cell fill. To get cells to stand out as layer look, fill with solid color over background.

    Few basics, from a DTP guy who likes simple sites as they are easy to maintain.

    John.
  • qparadoxqparadox Vancouver, BC
    edited December 2003
    rofl i didn't realize my & nbsp ended up as a space :P
Sign In or Register to comment.