We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 10226
    • 412 Posts
    I have a page that I want to show two columns across, and as many rows as needed. Cross-browser CSS is proving to be a major pain for me in past experiences with similar scenarios. Tables sound nice, but they need to be populated with ditto results... so this is almost impracticable to create a single table, and multiple tables will be bulky code-wise.

    So should I grunt it out and try CSS or does someone know how to use tables in this fashion?

    Thanks!
      • 33372
      • 1,611 Posts
      CSS should work fine for you, especially if you have exactly two columns and are using Ditto to generate the output. Use the regular and alternate templates in your Ditto call and make one a left chunk and one a right chunk (followed by a clear). You could use floated divs, unordered list items, or whatever else you prefer (just make sure that your measurements are correct, wrap them all in a wrapper div, and if you use floats leave the margin between them undefined, since I find that browsers lay out floated elements a bit carelessly and if there’s no wiggle room they won’t always keep them on the same horizontal line).
        "Things are not what they appear to be; nor are they otherwise." - Buddha

        "Well, gee, Buddha - that wasn't very helpful..." - ZAP

        Useful MODx links: documentation | wiki | forum guidelines | bugs & requests | info you should include with your post | commercial support options
        • 10226
        • 412 Posts
        ahh so my main tpl should be left and alt will be right... that makes sense *click* haha I was thinking a single call with floated ul’s... sounds reasonable, but those damn IE margins smiley Heck.. I’m already setup with alt on the ditto call and they have separate wrappers already.. this should be somewhat easy for me haha. I’m off to kedit..

        Thanks!
          • 10226
          • 412 Posts
          Working out decent so far.. but like I said nicely earlier, I hate IE.

          http://sweetskies.fruitwerks.us/babies.php

          not sure what is going on.. looks good in moz.. :/
            • 33372
            • 1,611 Posts
            div.babyr doesn’t seem to be floated left or right... I would float everything or nothing. And I usually find that not specifically defining either the margin between the two items (if floating one left and the other right) or the margin to the right of the rightmost item (if floating both left) keeps browsers from panicking and just dumping each item on its own line.
              "Things are not what they appear to be; nor are they otherwise." - Buddha

              "Well, gee, Buddha - that wasn't very helpful..." - ZAP

              Useful MODx links: documentation | wiki | forum guidelines | bugs & requests | info you should include with your post | commercial support options
              • 10226
              • 412 Posts
              nifty... I have been there before *scratches head* not sure if I want to try a ul just yet... I’m going to check out w3schools for a while before I give up on this method.

              *notes how the layout breaks horribly if I miss a </div> smiley
                • 10226
                • 412 Posts
                Well, literally played with my css for a while and got it.

                Thanks!
                  • 4018
                  • 1,131 Posts
                  Also, give Blueprint a shot (http://code.google.com/p/blueprintcss/). Makes creating multiple column layouts a breeze! smiley
                    Jeff Whitfield

                    "I like my coffee hot and strong, like I like my women, hot and strong... with a spoon in them."
                    • 27330
                    • 884 Posts
                    Jeff thanks for that link. looks very interesting.
                      • 28107
                      • 230 Posts
                      its a little bit like yaml ( www.yaml.de )
                        CONIN Werbeagentur . Köln
                        http://www.conin.de