Vertical-align:top , on serverside datatables version

Vertical-align:top , on serverside datatables version

CouinCouin Posts: 5Questions: 2Answers: 0
edited October 16 in Free community support

Hi,

I use datatables on a web tool I made to list my vinyls I added in a mySQL DB.

I would add the cover before the artist, in the artist column.

If i put this :
$nestedData[1] = "</span><img src='$cover' width='50' height='50'> $artist";
The artist name is at the bottom of the cell.

If I put this :
$nestedData[1] = "<img src='$cover' width='50' height='50'> <span style='vertical-align:top>$artist</span>";
or div or p instead of span, nothing is displayed.

In the css I already set :
table.dataTable tbody th,table.dataTable tbody td {vertical-align: top;padding: 0px 3px 0px 3px;}

Is there a way to do this ?

Thanks :)
Couin

Answers

  • colincolin Posts: 9,791Questions: 0Answers: 1,620

    We're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.

    Cheers,

    Colin

  • CouinCouin Posts: 5Questions: 2Answers: 0

    Hi Colin,

    Thanks for your help :)

    I reproduced the problem even if it's not a serverside version.

    You should see it here
    http://live.datatables.net/vuwuhaho/2/edit?html,css,js,console,output

    I would have the Artist names aligned to the Titles, on the top of cells. Is there a way to do it ?

    Also, I would the TR height has 50 px (cover height), without the small padding under images (Should I open a new thread ?).

    Thanks :smile:

  • silkspinsilkspin Posts: 53Questions: 13Answers: 1

    This would be a better way of presenting it... http://live.datatables.net/vuwuhaho/4/edit

  • CouinCouin Posts: 5Questions: 2Answers: 0

    Thanks for answer :)

    I would prefere to not separate covers to another column, but if there is not other solution , I'd to manage css tricks so it could render as I want.
    I come back once done.

    Thanks :)

Sign In or Register to comment.