Click to See Complete Forum and Search --> : Problem printing website: nothing prints!


letsgetsilly
07-13-2006, 10:33 AM
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.
<%@ REGISTER Src="Controls/Header.ascx" TagPrefix="x" Tagname="Header"%>
<%@ Page Language="vb" AutoEventWireup="false" Codebehind="ServicesIT.aspx.vb" Inherits="x14.ServicesIT"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD id="Head1">
<title>x Information Technology Services</title>
<link href="http://localhost/x/Images/icon/icon_x.ico" rel="icon">
<link href="http://localhost/x/Images/icon/icon_x.ico" type="image/x-icon" rel="shortcut icon">
<meta content="Visual Basic .NET 7.1" name="CODE_LANGUAGE">
<meta content="JavaScript" name="vs_defaultClientScript">
<meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<LINK href="Styles/x.css" type="text/css" rel="stylesheet">
<LINK href="Styles/Menus.css" type="text/css" rel="stylesheet">
<style type="text/css">#selected {
BACKGROUND-IMAGE: url(Images/navMenu/navServices-sel.jpg)
}

#leftborderpattern {
Z-INDEX: 500; TOP: 241px
}
#submenu {
HEIGHT: 241px
}
</style>
</HEAD>
<body>
<a name="top"></a>
<div style="POSITION: absolute; TOP: 300px; z-score: 900"></div>
<div><x:HEADER id="Header1" runat="server"></x:HEADER>
<div class="navMenu Services" id="divServices"><A class="menu" id="selected" href="Services.aspx"></A></div>
</div>
<div class="fullheightcontainer" id="container">
<div class="wrapper" id="wrapper">
<div class="mainbody serviceswide" id="mainbody">
<div class="maintitle" id="maintitle">Services</div>
<div class="HorizontalImage ServicesLONG" id="HorizontalImage"><IMG src="Images/misc/img_Services_Horizontal.jpg"></div>
<br>
<div style="MARGIN-LEFT: 20px">
<div class="capabilities" id = "capabilities"><span class="Subtitle1" style="font-size:14px">&nbsp;&nbsp;x Systems' Information Technology Capabilities Include:</span>
<ul style="margin-top:0; margin-bottom:0; line-height:15px">
<li>IT Portfolio Management</li>
<li>Enterprise architecture</li>

</ul><br style="line-height:8px">
</div>
<br style="line-height:5px">
<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>
&nbsp;
<br>

<span class="subtitle">Information Technology (IT)</span><br>

<span class="text">x We have been externally appraised
at CMMI Level 2, which assures our customers that our risk management, quality
assurance, project management (based on PMBOK) and software development
methodologies meet the highest process standards.<br>
<br>
IT projects can fail for non-technical reasons. x leverages its expertise
in organizational change to ensure that IT services are properly implemented
and deliver measurable improvements for our customers.
<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span>

<IMG src="Images/Charts/img_ServicesD4.jpg">
<br>
<br>

<span class="subtitle1">Success Story: Army Aspire</span>&nbsp;<A class="subtitle" href="#top"><u>[TOP]</u></A><br>
<br>
<span class="subtitle">Situation</span><br>
<br>

</div>
</div>
<div class="leftborder servicesLFT">
<div class="subnav" id="Submenu">
<div class="lefttopbuffer" id="lefttopbuffer"><IMG src="Images/misc/top-left-buffer.jpg"></div>
<div class="submenu first" id="submenu1"><A style=" TEXT-INDENT: 16px;" class="sidemenu2lines" href="ServicesOC.aspx">Organizational<br style="text-indent:16px">
<label style="margin-left:16px"></label>Change</A>
</div>
<div class="submenu second" id="submenu2"><A class="active2lines" href="ServicesIT.aspx">Information<br>
&nbsp;&nbsp;&nbsp; Technology</A>
<div class="divArrow" id="arrow"><IMG alt="active" src="Images/misc/img_arrow.jpg"></div>
</div>
<div class="submenu third" id="submenu3"><A class="sidemenu2lines" href="ServicesPE.aspx">Public&nbsp;and<br>
&nbsp;&nbsp;&nbsp; Environmental</A></div>
<div class="submenu fourth" id="submenu4"><A class="sidemenu" href="ServicesEL.aspx">eLearning</A></div>
<div class="submenu fifth" id="submenu5"><A class="sidemenu" href="ServicesCU.aspx">Contact
Us</A></div>
</div>
<div class="leftimage" id="leftborderpattern"></div>
</div>
<div class="rightborder ServicesRT" id="rightborder"><IMG alt="Image" src="Images/Rightborder/img_right_services.jpg"></div>
</div>
<DIV class="footer" id="footer"><IMG src="Images/misc/Footer.jpg"></DIV>

</div>
<a style="Z-INDEX: 900; VISIBILITY: hidden; POSITION: absolute; TOP: 1120px" name="success1">
SS1</a> <a style="Z-INDEX: 900; VISIBILITY: hidden; POSITION: absolute; TOP: 1920px" name="success2">
SS2</a>
</body>
</HTML>

kelly23
07-13-2006, 10:39 AM
Printing background images is controlled by each individual's browser. The default is not to print background colors or images, but can be changed (in IE) by going to Tools | Internet Options | Advanced | Printing | Print Background Color and Images

Kelly

letsgetsilly
07-13-2006, 11:22 AM
Ok, that's interesting. However none of the text that is located in the <divs> are showing up either.

kelly23
07-13-2006, 11:40 AM
Is the text set to white using css? If so, that could be the reason it's not showing; because the background color is not printing.

letsgetsilly
07-13-2006, 12:09 PM
No, all the text is in black on a white background.

The print for 1 page that is approx. 2 sheets long comes out like this:
Page 1:[HEADER] and nothing else
Page 2:nothing
Page 3:nothing
Page 4:[FOOTER]

In some cases, it will just print out:
[Header]
[Footer]

and then oddly enough on pages 3 and 4:
<li> here or there, 1 <li> per page!

kelly23
07-13-2006, 12:40 PM
I think the problem has something to do with those links at the bottom (Success 1 and 2) that start out with visibility: hidden and have absolute positioning. Success2 has an absolute position of top: 1920px. If you remove the positioning on those, the rest of the text (that you posted) prints on one page.

kelly23
07-13-2006, 12:45 PM
Maybe try "display: none" rather than "visibility: hidden". That should get rid of extra space when the links aren't visible.

Kelly

letsgetsilly
07-13-2006, 12:45 PM
That's really interesting, ill try it. Thanks.

letsgetsilly
07-13-2006, 12:52 PM
No that didn't do it. I got rid of them completely and still the same problem.

I don't understand why it prints out so many pages (4) for so little content.

letsgetsilly
07-13-2006, 12:53 PM
Good eye though kelly, and thanks for your help. This is really frustrating.

letsgetsilly
07-13-2006, 03:10 PM
Well, in the end I've just created style sheets designated only for printing. In these sheets I used fixed attributes instead of liquid attributes and it does the trick and looks nicer too