Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

print page problem with flash object

Posted on 2008-06-11
2
Medium Priority
?
448 Views
Last Modified: 2008-07-23
Hi, I am trying to use some css to define what is printed and what is not. For some reason my flash is still being printed. Please help if you can.
!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Jeff Janson Online Show Proofs</title>
<!-- SWFObject embed by Geoff Stearns geoff@deconcept.com http://blog.deconcept.com/ -->
<script type="text/javascript" src="swfobject.js"></script>
<style type="text/css">
#flashcontent {
	height: 100%;
	font: 12px 'Trebuchet MS', arial, sans-serif;
	font-weight: bold;
	color: #999;
	text-align:center;
	line-height: 200px;
}
body {
	margin: 0;
	padding: 0;
	background-color: #303030;
	height:100%;
	width: 100%;
}
#flash {
	display: block;
}
html {
	margin:0;
	padding:0;
	height:100%;
	width: 100%;
}
 
@media print {
 
            .unprintable {
                  display: none;
            }
            .printable {
                  display: block;
            }
 
      }
@media screen{
            .printable {
                  display: none;
            }
      }
</style>
</head>
<body>
<div id="flashcontent"> You need to upgrade your Flash Player !</div>
<div class="unprintable">
<script type="text/javascript">
		// <![CDATA[
						
		var so = new SWFObject("Gallery.v.2.swf", "flash", "100%", "100%", "8", "#303030");
		so.addVariable("xml", "data.xml");
		so.write("flashcontent");
		
		// ]]>
	</script>
    </div>
<div class="printable">
I want this printed
</div>
</body>
</html>

Open in new window

0
Comment
Question by:pertrai1
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 9

Expert Comment

by:zemond
ID: 21767442
zYou seem to be writing the flash object into  the div 'flashcontent' which does not have the class
0
 

Accepted Solution

by:
pertrai1 earned 0 total points
ID: 22034341
I was able to create a css for print only where the whole body was hidden. Thanks anyways.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
Suggested Courses

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question