Add CSS Borders to a datatables

Add CSS Borders to a datatables

michaeljerumichaeljeru Posts: 5Questions: 0Answers: 0
edited October 2010 in General
Hi everyone,
i have a datatable looking great, but when I print it (in greyscale), without the colors of the lines, and as there is no borders, it's not easy to read...
So, what I'd like to do id to add css borders to the columns and rows of the table.
Thanks for your help.

Replies

  • SRussellNSRussellN Posts: 15Questions: 0Answers: 0
    You may want to create a print.css file with media="print" associated with your page. There you can put in to add td and/or tr borders, but keep them from showing on your normal web page.
  • michaeljerumichaeljeru Posts: 5Questions: 0Answers: 0
    thanks man, that's exactly the need I had. I wanted indeed borders only when printing and not on the screen.
    I didn't know about the media rule, and by the way, I just discovered the aural property and the audio style sheet ! Impressive.

    thank you

    NB : as an example for users, I put an extract of the css code :
    this is a part of my css sheet main.css.
    [code]
    @media print {
    .printBorder {
    border-width:1px;
    border-style:solid;
    border-color:black;
    }
    }
    [/code]
This discussion has been closed.