Alignment Help

Alignment Help

MattDMattD Posts: 27Questions: 2Answers: 0
edited February 2014 in General
So I've been over the sDom documentation as well as many posts dealing with it. I'm having some alignment issues and based on a screenshot I'm wondering if anyone might be able to help.

Included in the screenshot is a location selection dropdown and as well as DataTables elements.

https://www.dropbox.com/s/xdytrik3qtv7a0l/alignment%20issues.PNG

sDom": 'T<"clear">lfrtip', <--- Current setting within my javascript file for the table.

1. I'd like to move the Editor / TT buttons to the right hand side above the search and have the selection drop down move itself down a bit. Side note, I can't figure out where the padding / margin is that is currently pushing it in a fraction.

2. Is the selection box not being a DataTables "element" going to cause an issue? Will I need to make it a custom DOM element as seen here https://datatables.net/examples/advanced_init/dom_toolbar.html?

I'm using Datatables 1.1.0 Beta 2, Editor 1.2.4 and the most recent TableTools nightly build (as recommended in another forum post).

If anyone has a better idea for lining that stuff up in a different manner than mentioned above, I'm all ears! Any help would be greatly appreciated!

Replies

  • allanallan Posts: 63,691Questions: 1Answers: 10,500 Site admin
    Hi,

    1. I think you might need to add:

    [code]
    div.DTTT_container {
    float: right;
    }
    [/code]

    to your CSS.

    The sDom parameter ( `dom` in 1.10) simply provides the order that the elements will appear in the document. CSS is then used to position them in the display.

    You might also need to add a `float:left` for your select element if you want them to align correctly.

    2. Not at all. You can use any elements you want. Creating a plug-in for it can be useful, but only for positioning in the `dom` parameter. It isn't needed at all.

    Allan
  • MattDMattD Posts: 27Questions: 2Answers: 0
    Thanks Allan, I'll give it a shot!
This discussion has been closed.