<table> to CSS conversion problem

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Matthias Hullin

    <table> to CSS conversion problem

    Hi!

    On http://festest.hullin.net/index2.php...ur&ausklapp=,2, (make
    sure to add that last comma to the URL), you can see a basic example of a
    discussion board's tree structure. Right now, I'm doing the expanded text
    box as a table, such as:

    <table cellpadding="0" cellspacing="0" width="634">
    <tr>
    <!-- first the vertical lines connecting the lower postings to the
    -->
    <td style="backgrou nd-image: url(/bilder/senkrecht.gif);
    background-repeat: repeat-y; width:18px">
    &nbsp;
    </td>
    <!-- then the text box itself -->
    <td style="border:1 px solid black;padding:3 px;margin:12px; ">
    {TEXT}
    </td>
    </tr>
    </table>

    As I tried to convert this into CSS, I built a table-like construction using
    the display property. Like:

    <div style="display: table; margin:0px; padding:0px; width:634px">
    <div style="display: table-row">
    <div style="display: table-cell; background-image:
    url(/bilder/senkrecht.gif); background-repeat: repeat-y; width:18px">
    </div>

    <div style="display: table-cell; border:1px solid black; padding:
    3px;margin: 12px;">
    {TEXT}
    </div>
    </div>
    </div>

    but in IE6, the outcome looks like this:



    The cells I'd like to have in one single row appear to have moved apart, and
    I really don't know why. Isn't this exactly the way to do tables in CSS? Any
    suggestions?

    Regards,
    Matthias


  • Zif

    #2
    Re: &lt;table&gt ; to CSS conversion problem

    Matthias Hullin wrote:[color=blue]
    > Hi!
    >
    > On http://festest.hullin.net/index2.php...ur&ausklapp=,2, (make
    > sure to add that last comma to the URL),[/color]

    Use '<URL:>' to enclose your links, then they'll work for most news
    readers.

    <URL:http://festest.hullin. net/index2.php?was= nurstruktur&aus klapp=,2,>

    [...]

    --
    Zif

    Comment

    • Matthias Hullin

      #3
      Re: &lt;table&gt ; to CSS conversion problem

      Ziv schrieb:[color=blue]
      > <URL:http://festest.hullin. net/index2.php?was= nurstruktur&aus klapp=,2,>[/color]

      Here, at least, this doesn't work - the comma is swallowed anyway. Any idea
      concerning my actual problem?

      Regards,
      Matthias


      Comment

      • Zif

        #4
        Re: &lt;table&gt ; to CSS conversion problem

        Matthias Hullin wrote:[color=blue]
        > Ziv schrieb:
        >[color=green]
        >><URL:http://festest.hullin. net/index2.php?was= nurstruktur&aus klapp=,2,>[/color]
        >
        >
        > Here, at least, this doesn't work - the comma is swallowed anyway.[/color]

        C'est la vie - be safe in the knowledge that others will appreciate
        your efforts even if you don't benefit.
        [color=blue]
        > Any idea
        > concerning my actual problem?[/color]

        If you believe the links below, display attributes table-row and
        table-cell aren't supported by IE.

        <URL:http://www.htmldog.com/reference/cssproperties/display/>
        <URL:http://meyerweb.com/eric/thoughts/category/tech/css/page/3/>

        One of the more knowledgeable posters should have responded by now, but
        it seems they'd rather argue over whether CSS really is better than
        tables than answer a fairly simple question.


        --
        Zif

        Comment

        • Lauri Raittila

          #5
          Re: &lt;table&gt ; to CSS conversion problem

          in comp.infosystem s.www.authoring.stylesheets, Matthias Hullin wrote:[color=blue]
          > Hi!
          >
          > On http://festest.hullin.net/index2.php...ur&ausklapp=,2, (make
          > sure to add that last comma to the URL),[/color]

          Your URL is bad if it requires , on the end. Nobody will understand it
          there, don't put it there.
          [color=blue]
          > you can see a basic example of a
          > discussion board's tree structure. Right now, I'm doing the expanded text
          > box as a table, such as:[/color]

          Your problem is that you are doing wrong thing. Doing layout like that is
          not too hard using CSS. What is hard is mark it up meaningfully.

          Mark up your HTML, then think how to do it with CSS. I see no sence at
          all for using CSS tables, this is far better to do with something
          simpler. Depends a lot on your markup, for example, is that image content
          or not.

          I would maybe mark it up as nested lists.
          [color=blue]
          > The cells I'd like to have in one single row appear to have moved apart, and
          > I really don't know why. Isn't this exactly the way to do tables in CSS? Any
          > suggestions?[/color]

          Yes. But tables are not very useful way to do your layout, and CSS tables
          don't work in IE.

          --
          Lauri Raittila <http://www.iki.fi/lr> <http://www.iki.fi/zwak/fonts>
          Kohtuuhintainen yksiö/huone haussa Oulusta syyskuusta eteenpäin.
          Searching places to sleep on axis Bonn - Tsech - Poland - baltic sea in
          july

          Comment

          Working...