I'm trying to work out a problem with a fairly simple <div> which doesn't want to print completely.

I'm using 960.gs to get things laid out the way I like, and all of this is enclosed in a container_12, and has a left column next to it (I can provide this, I just wanted to keep the code short). The content of the div is being populated from Django.

The div looks something like this:

<div class="ordered_generic_inquiry_info">
    <div class="entrydataline grid_9 alpha omega even">
        <div class="grid_3 alpha entrykey"><span>first_name</span></div>
        <div class="grid_6 omega entryvalue">Jack</div>
    <div class="entrydataline grid_9 alpha omega odd">
        <div class="grid_3 alpha entrykey"><span>last_name</span></div>
        <div class="grid_6 omega entryvalue">Daniels</div>
    <!-- Repeated a dynamic number of times.  -->

The output looks like so:


  • And what's it supposed to look like? Have you tested this in with more than one browser/printer driver combination? Nathan Duran about 9 years ago
  • Yeah, you really need to spell out what the problem is you're trying to fix. Also, that looks like tabular data and should probably be in a <table>. Doug about 9 years ago
  • The web is not a print medium, if the layout of printed data is important then you really should create a PDF for downloading and printing. All browsers handle printing differently and you'll go quite mad trying to get consistent cross browser print layout. and then there's the different page sizes, over which you also have no control. Tony Crockford about 9 years ago

1 answer


Tables are dedicated to this sort of things. You should use a table as your main data container And not a grid typographic layout. With thead, tbody and tfoot correctly set, many browsers will produce a quite good print output (repeating thead and tfoot on each page, for example).

Answered about 9 years ago by Julien Bidoret