I am altering my print.css file to make the theme go away when it is time to print but there is one area I just can't seem to exclude in the css no matter what I try. Please tell me how to remove the top area (image of what I want removed included.)

http://curseoftime.com/GRS/drupal/images/misprint.JPG

Comments

prattboy’s picture

Do you want to remove everything shown in the image or just a portion of what you are showing in the image?

Mink’s picture

The header (where it says 17|Unsecured Recovery Service Page 1 of 3) can remain. The rest needs to be off. The template pages I have made were made to print a specific way and this bit is really screwing things up.

prattboy’s picture

You'll probably need to remove anything that appears before the content, then. The problem is those aren't marked with classes or ID's that can be styled.

If you see something similar in your template (page.tpl.php)

     <?php if ($breadcrumb): print $breadcrumb; endif; ?>
          <?php if ($mission): print '<div id="mission">'. $mission .'</div>'; endif; ?>

          <?php if ($tabs): print '<div id="tabs-wrapper" class="clear-block">'; endif; ?>
          <?php if ($title): print '<h2'. ($tabs ? ' class="with-tabs"' : '') .'>'. $title .'</h2>'; endif; ?>
          <?php if ($tabs): print $tabs .'</div>'; endif; ?>

          <?php if (isset($tabs2)): print $tabs2; endif; ?>

          <?php if ($help): print $help; endif; ?>
          <?php if ($messages): print $messages; endif; ?>

You should be able to stick a div around all of that and then style it to display: none in your print css... for example, you might do:

<div id="hideThis">
     <?php if ($breadcrumb): print $breadcrumb; endif; ?>
          <?php if ($mission): print '<div id="mission">'. $mission .'</div>'; endif; ?>

          <?php if ($tabs): print '<div id="tabs-wrapper" class="clear-block">'; endif; ?>
          <?php if ($title): print '<h2'. ($tabs ? ' class="with-tabs"' : '') .'>'. $title .'</h2>'; endif; ?>
          <?php if ($tabs): print $tabs .'</div>'; endif; ?>

          <?php if (isset($tabs2)): print $tabs2; endif; ?>

          <?php if ($help): print $help; endif; ?>
          <?php if ($messages): print $messages; endif; ?>
</div><!-- /hidethis -->

and in your print.css file put

#hideThis {
display: none;
}
Mink’s picture

I did try that, thank you for pointing out where to look but now I am to the point that I am about to bang my head against the wall again. I am modifying the files for the Garland theme (have not setteled on a theme for the site yet) and it is making a very big empty space on the page using the code you suggested. Go here to see what I mean.

http://curseoftime.com/GRS/drupal/images/screenshot.JPG

It also still did not take off all the elements even though it should have from what I saw of your code. I think that since my boss wants this printed in a very specific way I am going to have to rely on a seperate print page that I made for this reason, and just find a way to secure it. :( Thanks though.

prattboy’s picture

There's a possibility that some of the elements you are trying to get rid of are actually in the content area, in which case you'll need to do a template for the specific content types. I hope that's not the case, though.

It's odd that the big blank area is showing up when you view the page in your browser. Did you put it in the print.css file? If so, it shouldn't affect the browser output at all.

If you're comfortable (or able) to show me the actual URL of the site, I'd be happy to take a closer look. You can message me via my site contact form.

Mink’s picture

Unfortunately I am using confidential data in the server, so I can't let you in at this point. I did make a seperate print page and I am pretty satisfied with that (just need to tweek it a bit to make sure it is secure).

I know quite a bit about html and css and I saw nothing that I did to cause the blank area. But as I said, that is immaterial because the seperate page prints fine. It wouldn't have been such a big deal if my boss wasn't so picky. :)

prattboy’s picture

I'm glad you got it worked out ;)