oshirowanen
oshirowanen

Reputation: 15925

IE8 not printing properly

I have some data on my screen in table form, and the width of the table is set to 500px. This looks identical in both IE8 and Chrome.

However, when I print this screen using Chrome, the print looks identical to what you see on the screen, i.e. the number of characters per line and the number of lines.

When I print it from IE8, the number of characters per line and the number of lines does not match when is seen on the IE8 screen.

Why is this happening and how do I get the printed output to match the screen output?

Here is the HTML table:

<table id="test-table" width="500px">
    <tr>
        <td>
            Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum porttitor, nunc sit amet aliquet sodales, enim nisi malesuada magna, eget auctor arcu urna eu nisi. Etiam gravida faucibus mauris in bibendum. Cras eu elit eget leo porttitor scelerisque nec eget eros. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Pellentesque accumsan tellus dolor, quis convallis massa placerat ac. Donec eros metus, ornare eu risus ac, malesuada fermentum nibh. Integer facilisis ut velit a adipiscing. Maecenas in eleifend mi. Nullam feugiat pulvinar mauris. Duis ligula purus, fringilla et pretium egestas, scelerisque vitae dui.
        </td>
    </tr>
    <tr>
        <td>
            Nunc suscipit et neque ac fermentum. Nam condimentum sit amet mauris eget consequat. Aenean gravida cursus ante, id ultricies eros suscipit nec. Pellentesque viverra velit faucibus diam gravida aliquet. Etiam vehicula massa nunc, sed accumsan quam mattis sit amet. Vivamus id ornare quam. In facilisis accumsan sodales. Morbi aliquet, augue in feugiat vulputate, sem neque ultricies mauris, quis facilisis risus dolor at ante. Duis dignissim lacus cursus mauris pulvinar cursus. Sed sed libero sed quam tincidunt euismod at sed mi. Nunc nec consectetur dolor. Quisque et accumsan neque.
        </td>
    </tr>
</table>

Upvotes: 0

Views: 36

Answers (1)

CaribouCode
CaribouCode

Reputation: 14398

You can use the css media query for print to style how the printed version looks:

@media print {
  /* your styles here*/
}

Upvotes: 1

Related Questions