side by side tables

side by side tables

darickarddarickard Posts: 1Questions: 0Answers: 0
edited April 2010 in General
I'd like to have two tables side by side on a page rather than one above another. My tables get wrapped in a div by DataTables. I tried the following styling but it didn't seem to work.
[code]
.dataTables_wrapper {
display: inline;
}
[/code]

Any suggestions?

Replies

  • DrakoDrako Posts: 73Questions: 0Answers: 0
    couldnt find a way to do this also.

    anyone knows?

    thanks!!
  • kenirwinkenirwin Posts: 6Questions: 0Answers: 0
    Me too! Inquiring minds want to know...
  • allanallan Posts: 63,519Questions: 1Answers: 10,473 Site admin
    .dataTables_wrapper {
    float: left;
    width: 50%;
    }

    perhaps?

    Allan
  • kenirwinkenirwin Posts: 6Questions: 0Answers: 0
    That doesn't appear to work. I can't figure out why. If you throw a border around it you can see that the div becomes narrower, but it still breaks after for a new line.

    I also tried
    display: inline
    and
    position: relative
    and neither of those did the trick either.
  • allanallan Posts: 63,519Questions: 1Answers: 10,473 Site admin
    Ah - the default CSS has clear:both for the wrapper element. This will do it:

    [code]
    .dataTables_wrapper {
    float: left;
    width: 50%;
    clear: none
    }
    [/code]
    Allan
This discussion has been closed.