ColVis (or other elements) and positioning
ColVis (or other elements) and positioning
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...
[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...
This discussion has been closed.
Replies
[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...