Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Query regarding stylesheets

Status
Not open for further replies.

CHeighlund

Programmer
Jun 11, 2007
163
0
0
US
I'm working on a web form project (or, more precisely, web-based output for the results of a desktop-located form). As some of the form questions may have multiple answers, I figured I needed to break the (printed) page at certain locations, so all of the answers to a question are on the same page as the question itself.

In the past, I have used a specific inhouse stylesheet to make pagebreaks. Now however, for some reason, it doesn't appear to be working correctly. At the moment, I'm only able to test this on Internet Explorer; I'm having other problems elsewhere in the code with Firefox.

This is the stylesheet link reference:
Code:
<link rel="stylesheet" type="text/css" href="cancelheader.css"/>

This is the complete contents of the file 'cancelheader.css':
Code:
p { page-break-before: always;}

Am I doing something wrong with the code, or the way I'm pulling it into the page, or is this simply a case of IE not wanting to behave itself with the stylesheet?
 
You don;t seem to be applying it to the printed media.

Code:
<link rel="stylesheet" type="text/css" [red]media="print"[/red] href="cancelheader.css"/>


----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
Thank you for the advice, change made. However, it still doesn't seem to have had any effect on the output. Print Preview is still showing lines where I know I'm breaking (from checking the html source) that are on the wrong page. Any other suggestions?
 
Well other than to make sure you have your <p> tags in the correct places I'm not sure what to tell you.



----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
Does Internet Explorer properly support the CSS2 protocol? Some of what I've read leads me to believe that particular effect is a CSS2 one.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top