470,810 Members | 1,080 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,810 developers. It's quick & easy.

Problem printing website developed with CSS:Nothing prints!

I'm developing the external corporate website for my company in Visual Studio 2003 using html, css, and a user web control for the header/navigation.

When I try to print any of the pages only the header image (an <img> located in the Web User control) and the footer (also <img>) will print, but none of the text, graphics, background colors, or background images that are included.

My page is a liquid 3 column + 1 header + 1 footer CSS design which I suspect is the culprit. Are there any tricks for printing out in CSS? Has anyone had this problem before?

I will post some of my code here but unfortunately I cannot post a URL because at this point it is internal only.

Thanks for any help!

note: i've very quickly and roughly edited out my company name and a bunch of content to make it smaller. There may be errors.
Expand|Select|Wrap|Line Numbers
  1. <%@ REGISTER Src="Controls/Header.ascx" TagPrefix="x" Tagname="Header"%>
  2. <%@ Page Language="vb" AutoEventWireup="false" Codebehind="ServicesIT.aspx.vb" Inherits="x14.ServicesIT"%>
  3. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
  4. <HTML>
  5.     <HEAD id="Head1">
  6.         <title>x Information Technology Services</title>
  7.         <link href="http://localhost/x/Images/icon/icon_x.ico" rel="icon">
  8.         <link href="http://localhost/x/Images/icon/icon_x.ico" type="image/x-icon" rel="shortcut icon">
  9.         <meta content="Visual Basic .NET 7.1" name="CODE_LANGUAGE">
  10.         <meta content="JavaScript" name="vs_defaultClientScript">
  11.         <meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
  12.         <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  13.         <LINK href="Styles/x.css" type="text/css" rel="stylesheet">
  14.         <LINK href="Styles/Menus.css" type="text/css" rel="stylesheet">
  15.         <style type="text/css">#selected {
  16.     BACKGROUND-IMAGE: url(Images/navMenu/navServices-sel.jpg)
  17. }
  19. #leftborderpattern {
  20.     Z-INDEX: 500; TOP: 241px
  21. }
  22. #submenu {
  23.     HEIGHT: 241px
  24. }
  25.         </style>
  26.     </HEAD>
  27.     <body>
  28.         <a name="top"></a>
  29.         <div style="POSITION: absolute; TOP: 300px; z-score: 900"></div>
  30.         <div><x:HEADER id="Header1" runat="server"></x:HEADER>
  31.             <div class="navMenu Services" id="divServices"><A class="menu" id="selected" href="Services.aspx"></A></div>
  32.         </div>
  33.         <div class="fullheightcontainer" id="container">
  34.             <div class="wrapper" id="wrapper">
  35.                 <div class="mainbody serviceswide" id="mainbody">
  36.                     <div class="maintitle" id="maintitle">Services</div>
  37.                     <div class="HorizontalImage ServicesLONG" id="HorizontalImage"><IMG src="Images/misc/img_Services_Horizontal.jpg"></div>
  38.                     <br>
  39.                     <div style="MARGIN-LEFT: 20px">
  40.                         <div class="capabilities" id = "capabilities"><span class="Subtitle1" style="font-size:14px">&nbsp;&nbsp;x Systems' Information Technology Capabilities Include:</span>
  41.                         <ul style="margin-top:0; margin-bottom:0; line-height:15px">
  42.                         <li>IT Portfolio Management</li>
  43.                         <li>Enterprise architecture</li>
  45.                         </ul><br style="line-height:8px">
  46.                         </div>
  47.                         <br style="line-height:5px">
  48.                         <table style="height:25px;width:559px; cell-padding:0;cell-spacing:0 "><tr style="height:25px;width:559px; cell-padding:0;cell-spacing:0 "><td style="width:272px;text-align:right"><A  href="#success1"><img style="border-style: none; " src="images/misc/img_services_ss1.jpg"></A></td><td style="text-align:right"><A href="#success2"><img style="TEXT-ALIGN: right; border-style:none; " src="images/misc/img_services_ss2.jpg"></A></td></tr></table>
  49.                         &nbsp;
  50.                         <br>
  52.                         <span class="subtitle">Information Technology (IT)</span><br>
  54.                         <span class="text">x  We have been externally appraised 
  55.                             at CMMI Level 2, which assures our customers that our risk management, quality 
  56.                             assurance, project management (based on PMBOK) and software development 
  57.                             methodologies meet the highest process standards.<br>
  58.                             <br>
  59.                             IT projects can fail for non-technical reasons. x leverages its expertise 
  60.                             in organizational change to ensure that IT services are properly implemented 
  61.                             and deliver measurable improvements for our customers.
  62.                             <br>
  63.                             <br>
  64.                             &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  65.                         </span>    
  67.                         <IMG src="Images/Charts/img_ServicesD4.jpg">
  68.                         <br>
  69.                         <br>
  71.                         <span class="subtitle1">Success Story: Army Aspire</span>&nbsp;<A class="subtitle" href="#top"><u>[TOP]</u></A><br>
  72.                         <br>
  73.                         <span class="subtitle">Situation</span><br>
  74.                         <br>
  76.                     </div>
  77.                 </div>
  78.                 <div class="leftborder servicesLFT">
  79.                     <div class="subnav" id="Submenu">
  80.                         <div class="lefttopbuffer" id="lefttopbuffer"><IMG src="Images/misc/top-left-buffer.jpg"></div>
  81.                         <div class="submenu first" id="submenu1"><A style=" TEXT-INDENT: 16px;" class="sidemenu2lines" href="ServicesOC.aspx">Organizational<br style="text-indent:16px">
  82.                                 <label style="margin-left:16px"></label>Change</A>
  83.                         </div>
  84.                         <div class="submenu second" id="submenu2"><A class="active2lines" href="ServicesIT.aspx">Information<br>
  85.                                 &nbsp;&nbsp;&nbsp; Technology</A>
  86.                             <div class="divArrow" id="arrow"><IMG alt="active" src="Images/misc/img_arrow.jpg"></div>
  87.                         </div>
  88.                         <div class="submenu third" id="submenu3"><A class="sidemenu2lines"     href="ServicesPE.aspx">Public&nbsp;and<br>  
  89.                                 &nbsp;&nbsp;&nbsp; Environmental</A></div>
  90.                         <div class="submenu fourth" id="submenu4"><A class="sidemenu" href="ServicesEL.aspx">eLearning</A></div>
  91.                         <div class="submenu fifth" id="submenu5"><A class="sidemenu" href="ServicesCU.aspx">Contact 
  92.                                 Us</A></div>
  93.                     </div>
  94.                     <div class="leftimage" id="leftborderpattern"></div>
  95.                 </div>
  96.                 <div class="rightborder ServicesRT" id="rightborder"><IMG alt="Image" src="Images/Rightborder/img_right_services.jpg"></div>
  97.             </div>
  98.                 <DIV class="footer" id="footer"><IMG src="Images/misc/Footer.jpg"></DIV>
  100.         </div>
  101.         <a style="Z-INDEX: 900; VISIBILITY: hidden; POSITION: absolute; TOP: 1120px" name="success1">
  102.             SS1</a> <a style="Z-INDEX: 900; VISIBILITY: hidden; POSITION: absolute; TOP: 1920px" name="success2">
  103.             SS2</a>
  104.     </body>
  105. </HTML>
Jul 13 '06 #1
2 2812
4,258 Expert 4TB
I displayed your code in my browser and it prints what is displayed. So the culprit must be in one of your included files, such as the CSS ones.

Are you sure that you don't have a { display:none; } somewhere in your CSS files? Or a separate media="print" include?

Ronald :cool:
Jul 21 '06 #2
I'll check it out. It definetly works when I create an independent print.css file
Jul 21 '06 #3

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

1 post views Thread by Leigh Riley | last post: by
7 posts views Thread by Bob Bedford | last post: by
117 posts views Thread by Peter Olcott | last post: by
1 post views Thread by Mohamed Fysal | last post: by
12 posts views Thread by Peter Proost | last post: by
1 post views Thread by choffi | last post: by
19 posts views Thread by cpnet | last post: by
5 posts views Thread by =?Utf-8?B?U2FpIFZhamph?= | last post: by
10 posts views Thread by r_ahimsa_m | last post: by
reply views Thread by mihailmihai484 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.