ColVis (or other elements) and positioning

ColVis (or other elements) and positioning

aaronwaaronw Posts: 89Questions: 3Answers: 4
edited July 2011 in Plug-ins
So I was able to understand the sDom option and understand that "C" is the positioning of the colvis button, but I'm not quite sure how I make it go to the left side of the table instead of the right side of the table. I kind of hacked it via:

[code]

div.lefttest { float:left };


$(document).ready(function()
{
$('#example').dataTable({
"bStateSave": true,
"sScrollX": "100%",
"sPaginationType": "full_numbers",
"bJQueryUI" : true,
"sDom": '<"lefttest"C><"clear">lfrtip'
});
}
);
[/code]

But I'm not sure if this is the "right" way to do it... I'm still learning to let the libraries do all the things that they can do, and I don't always understand the way they mesh together...

Replies

  • fbasfbas Posts: 1,094Questions: 4Answers: 0
    I believe that's the right way to do it.
  • aaronwaaronw Posts: 89Questions: 3Answers: 4
    edited July 2011
    So after monkeying around with it a little more, I'm now on:

    [code]

    .ColVis { float:left ; margin-bottom: 0}

    "sDom": '<"H"Clfr>t<"F"ip>'
    [/code]

    since I was using the JQuery UI.

    Also, I noticed that the colvis has a class of ColVis, so I just can just float:left that instead of hacking up my own div class.


    However, what I guess I really want is the l, C, and then f all on the same row, the l is left float, the f is right float, but I don't know how to get the C to get between them. It looks kinda awkward this way...
  • fbasfbas Posts: 1,094Questions: 4Answers: 0
    have you tried using display:inline for those elements, so they don't act as a block?
This discussion has been closed.