How to remove apparent newline after div in sDom

How to remove apparent newline after div in sDom

gmsilveygmsilvey Posts: 4Questions: 0Answers: 0
edited April 2014 in General
My sDom looks like this:

"sDom": 'l<"#tableHeader">Tftip',

I then have this:

$('#tableHeader').addClass('datatablesHeader');
$('#tableHeader').html("Some Text");

I have set the styles datatablesHeader and dataTables_filter to have display:inline

However there is an apparent newline between the text "Some Text", and the filter label "Search:".

Any suggestions on how to remove this?

Essentally I want all of the sDom items on one line.

Replies

  • allanallan Posts: 61,743Questions: 1Answers: 10,111 Site admin
    Link to a test case showing the issue please.

    Allan
  • gmsilveygmsilvey Posts: 4Questions: 0Answers: 0
    I have no external website available to post a link.
  • allanallan Posts: 61,743Questions: 1Answers: 10,111 Site admin
    Use JSFiddle or http://live.datatables.net to post a test case then: http://datatables.net/forums/discussion/12899/post-test-cases-when-asking-for-help-please-read .

    Allan
  • gmsilveygmsilvey Posts: 4Questions: 0Answers: 0
    Okay, here we go. (It was easier to create my own link then use either of those two sites.)

    An example that illustrates my question. Like I stated, I simply want to get all of the items in sDom on one line.

    http://gsilvey.com/datatablesexample.html

    Thanks for your help...
  • allanallan Posts: 61,743Questions: 1Answers: 10,111 Site admin
    Thanks for the link.

    Its just a case of altering the order of the DOM elements and making any CSS changes required. In the example you have, putting the filtering input before your extra header element will get it all on one line for example:

    [code]
    "sDom": 'lTf<"#tableHeader">tip',
    [/code]

    TableTools isn't loading due to a bunch of 404 errors, but that will at least get your example on one line.

    Allan
  • gmsilveygmsilvey Posts: 4Questions: 0Answers: 0
    Thank Allan. I appreciate your help.
This discussion has been closed.