Create margins / padding on cells.

Create margins / padding on cells.

classic12classic12 Posts: 228Questions: 60Answers: 4

I am using showing just one column ( this contains an iframe ) and need to add spacing within each cell.

How do I achieve this please?

Cheers

Steve Warby

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 61,438Questions: 1Answers: 10,052 Site admin

    Margin isn't something that you can really do for table cells, but padding is simply the padding CSS attribute:

    td.className {
      padding: ...
    }
    

    Allan

  • classic12classic12 Posts: 228Questions: 60Answers: 4

    Hi Allan,

    where does this code go please ?



    function iframesReturned() { dataChanged =[]; // if (req.status == 200) { //success // alert('data back '+ req.responseText); //dataReturned = JSON.parse(req.responseText); // dataReturned = req.responseText; // alert(dataReturned);} $("#dtIframes").DataTable().destroy(); $('#dtIframes').empty(); //data = dataReturned; tableIframe = $('#dtIframes').DataTable( { ajax: "http://www.xxx.com/xxxxx/getIframes.php", columns: [ { data: "anims.url", title : ' Title ', width : '150px' } ] }) // tableIframe.className { // padding-top: 200px; // } } Button1.onclick=function(){ // get the iframe data and show in datatable. iframesReturned(); }

    Cheers

    Steve Warby

  • allanallan Posts: 61,438Questions: 1Answers: 10,052 Site admin
    Answer ✓

    Its CSS. It would go in one of your stylesheets.

  • classic12classic12 Posts: 228Questions: 60Answers: 4

    Got it working thanks.

This discussion has been closed.