Current location: Hot Scripts Forums » General Web Coding » CSS » Background images of print.css doesnt show?


Background images of print.css doesnt show?

Reply
  #1 (permalink)  
Old 11-15-08, 08:25 AM
bassa bassa is offline
Newbie Coder
 
Join Date: Oct 2008
Posts: 30
Thanks: 0
Thanked 0 Times in 0 Posts
Background images of print.css doesnt show?

Hello!

I have a print button on my website that is set to print out only certain areas of the main contents, such as the headline, texts and image thumbnails.

However, the background images that I used for my thumbnail placeholder doesn't show on the printed page.

Perhaps someone could help me figure out how to get them to be printed?

Here's a link to the webpage:

http://www.froso.dk/test/index.html

Here's the code for the thumbnail classes in the print.css file:

Code:
.thumbnail {
	height: 100%;
	width: 160px;
	float: left;
	text-decoration: none;
	margin: 0px 10px 10px 0px;
	padding: 0px;
	text-align: center;
}

.thumbnailtop {
	height: 10px;
	width: 160px;
	text-decoration: none;
	margin: 0px auto;
	padding: 0px;
	background: url(../images/thumbnail_top.gif) no-repeat;
}
.thumbnailcenter {
	height: 100%;
	width: 160px;
	text-decoration: none;
	margin: 0px auto;
	padding: 0px;
	background: url(../images/thumbnail_center.gif);
}

.thumbnailbottom {
	height: 30px;
	width: 160px;
	text-decoration: none;
	margin: 0px auto;
	padding: 0px;
	background: url(../images/thumbnail_bottom.gif) no-repeat;
	line-height: 30px;
	font-weight: bold;
}
I just copied them over from the main CSS file (froso.css).

Help, anyone?


Cheers,
Bassa
Reply With Quote
  #2 (permalink)  
Old 11-18-08, 10:28 AM
Yeroon's Avatar
Yeroon Yeroon is offline
Code Master
 
Join Date: Aug 2007
Location: Netherlands, Nijmegen
Posts: 850
Thanks: 2
Thanked 20 Times in 20 Posts
There is no way to tell the client to print background images with standard CSS background properties.

I always use the following 'hack':

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<style type="text/css" media="print">
#ti\tle {
	display: list-item;
	list-style-image: url(banner.jpg);
	list-style-position: inside;
	letter-spacing: -1000em;
	font-size: 1pt;
	color: #fff;
	}
</style>
</head>
<body>
<h1 id="title">here it shows image which will print</h1>
Lorum ipsum.....
</body>
</html>
__________________
Feel free to thank people if they help you by clicking thanks at a post.
=================================
Make it idiot proof and someone will make a better idiot.
=================================
Realise the impotence of proof reading everything you publish
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
2 divs, one top one bottom, problem with background images Mythvn CSS 2 04-28-08 06:27 PM
Converting to ems spyke01 CSS 0 11-09-07 02:48 PM
DIV background (top & bottom images) overlapping? sp1ky CSS 1 11-12-06 10:53 AM
Background images in tables - help!! benholmes12345 HTML/XHTML/XML 1 02-20-06 09:03 AM
show images from folder kalinchuk PHP 1 06-21-05 03:26 PM


All times are GMT -5. The time now is 02:16 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.