Designate What Will Print From Your Web Pages (1 viewing) (1) Guest
Favoured: 0
|
|
|
TOPIC: Designate What Will Print From Your Web Pages
|
admin (Admin)
Admin
Posts: 19
|
|
Designate What Will Print From Your Web Pages 1 Year, 6 Months ago
|
Karma: 6
|
|
You may not want certain parts of your web pages to show up when someone prints the page. Items like a menu, banner ads, Google ads and so on. So how do you designate what will print from your web pages? The best solution is to use CSS to hide certain parts of your page from printers. What I mean is, you can create a simple piece of CSS code that will keep whatever areas of your from printing.
All you have to do is add this to your css file:
@media print {
.printhide { display:none; }}
Now let's say you only want an image from your web page to print. Then you code your page something like this:
<p class="printhide">This would be what ever text you have on the page that you don't want printed</p>
<img src="images/pict-you-want-to-print.jpg" width="10" height="10" alt="describe image">
<p class="printhide">Then you would have more text on the page that you also don't want to print.</p>
You can use the "class=printhide" tag to hide other things on the page you don't want to print like banner images and ads. All you have to do is surround what you don't want to print with a tag like this:
<span class="printhide"><img src="images/pict-you-DONT-want-to-print.jpg" width="10"
height="10" alt="describe image"></span>
By using this very simple css code, you can create a very clean printable version of your web pages.
|
|
|
|
|
|
|
Last Edit: 2008/08/17 21:20 By admin.
|
|
|
|
|
|
The administrator has disabled public write access.
|
|
|
|
|