moving the position of the table on the webpage

moving the position of the table on the webpage

johnli75johnli75 Posts: 6Questions: 0Answers: 0
edited February 2013 in General
Hi

I'd like to move a datatable to the right of another jquery object (a dynatree tree).

When I set the css attributes left and top, the table contents move to the new position, but the other elements, such as search box, header, pagination etc, stay where they are.

i.e.

// css stuff
#mytable
{
left: 300px;
top: 10px;
}

// then later, table init
$('#mytable').dataTable({
// blah blah
});


Any idea how I can get the whole lot to move to the new position?

Thanks

Liam

Replies

  • EranEran Posts: 26Questions: 0Answers: 0
    Hi Liam,

    I believe this might help you out:
    http://www.datatables.net/release-datatables/examples/basic_init/dom.html
  • allanallan Posts: 63,523Questions: 1Answers: 10,473 Site admin
    DataTables puts the table and the other controls into a DIV wrapper ( `dataTable_wrapper` ) which you will likely want to apply style to, to move the whole lot.

    Allan
  • johnli75johnli75 Posts: 6Questions: 0Answers: 0
    Hi Allan,

    Great, when I used #mytable_wrapper it worked perfectly.

    Many thanks

    Liam
This discussion has been closed.