| | |
Query regarding .css files.
Please support our HTML and CSS advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Aug 2006
Posts: 999
Reputation:
Solved Threads: 1
I'm having a bit of trouble figuring something out. I have a css file I use to attempt to break pages in the correct spot, and to force a landscape print so as to ensure that the words on the web reports my php program builds aren't packed together when printed out. The following is a complete copy of the text of the css file I use to
do this-
The css file is called from my program with the following command-
For some reason, I'm now having trouble getting this to work on a new program. As far as I can tell, the only differences are that a) the new program includes others that also make use of the page-break function, and b) the new files are in a different directory from the original css file. A copy of the css file has been placed in this directory, however.
Before, I've always used a single php file; now, I've got three separate files that get called from a single higher one. With this program, I cannot get the pagebreaks to occur when they are supposed to according to the css file.
I have tried the following to attempt to solve this:
1) Each of the original files included the reference to the css file. I commented those out, leaving instead a single copy in the higher-level file that calls(includes) them. This has not helped. Even a <p/> tag within the higher-level file does not break the way it should.
2) I tried to clear the cache, in hopes of solving the problem that way. This has not worked.
3) I closed down all browser windows (I thought this only applied to sessions, but I wanted to make certain) then opened up a new one and loaded the page again. This did not work.
I am using Firefox, version 1.5.0.12, to load the page.
Does anyone have any suggestions what my problem here might be, or solutions as to other things I can try to solve it?
do this-
HTML and CSS Syntax (Toggle Plain Text)
p { page-break-before: always;} @page { size landscape; }
HTML and CSS Syntax (Toggle Plain Text)
echo '<link rel="stylesheet" type="text/css" href="cancelheader.css"/>';
Before, I've always used a single php file; now, I've got three separate files that get called from a single higher one. With this program, I cannot get the pagebreaks to occur when they are supposed to according to the css file.
I have tried the following to attempt to solve this:
1) Each of the original files included the reference to the css file. I commented those out, leaving instead a single copy in the higher-level file that calls(includes) them. This has not helped. Even a <p/> tag within the higher-level file does not break the way it should.
2) I tried to clear the cache, in hopes of solving the problem that way. This has not worked.
3) I closed down all browser windows (I thought this only applied to sessions, but I wanted to make certain) then opened up a new one and loaded the page again. This did not work.
I am using Firefox, version 1.5.0.12, to load the page.
Does anyone have any suggestions what my problem here might be, or solutions as to other things I can try to solve it?
"No trees were harmed in the production of this post. However, several electrons were severely inconvenienced."
Kumquat.
Kumquat.
•
•
Join Date: Aug 2006
Posts: 999
Reputation:
Solved Threads: 1
@MidiMagic:
In this case, the choice belongs to my boss, who tells me what needs to be put on the page, that the results have to be printable from the browser to paper, and that the page needs to be made to look neat on paper. Unless the browser's going to shrink the results for me, these aren't compatible with portrait formatting. Too many items.
@Thread:
Found the problem...simple PEBKAC error in the code. I'd somehow forgotten to close off a set of table tags.
In this case, the choice belongs to my boss, who tells me what needs to be put on the page, that the results have to be printable from the browser to paper, and that the page needs to be made to look neat on paper. Unless the browser's going to shrink the results for me, these aren't compatible with portrait formatting. Too many items.
@Thread:
Found the problem...simple PEBKAC error in the code. I'd somehow forgotten to close off a set of table tags.
"No trees were harmed in the production of this post. However, several electrons were severely inconvenienced."
Kumquat.
Kumquat.
But your boss can't override internet security, or the law, or the limitations of the hardware attached to the computer.
That choice is the PROPERTY of the user. It belongs to him, because his computer belongs to him. Those settings are permanently part of his computer, not your web page. They are in his printer driver, not part of the browser or the web page. When you make that choice in the browser's FILE menu, you are really talking to the printer driver, and using the printer driver's own dialog box.
Also note that some printer drivers do not HAVE a landscape setting, because the printer can't DO landscape. You can't assume that everyone has a LaserJet or a Lexmark. A relative's computer still has a daisy-wheel printer. The "landscape" mode requires her to physically move the paper guides, put the paper in sideways, and select "landscape 11 X 8.5 paper" from the paper choices. There is no way to just select "landscape" on that computer and have it work.
Your boss can blow his little top off, with steam coming out his ears, but he can't change the law, the rules of internet security, or the limitations of the user's computer hardware. So you should have a camera ready, so you can photograph the steam when he finds these things out.
If you do find a way to do this, you could be violating federal law. And if you were ordered to crack into the user's computer so the boss can have his way, then the boss can be charged too.
The only right way to do this is to ASK the user to change his settings to landscape before printing the page.
That choice is the PROPERTY of the user. It belongs to him, because his computer belongs to him. Those settings are permanently part of his computer, not your web page. They are in his printer driver, not part of the browser or the web page. When you make that choice in the browser's FILE menu, you are really talking to the printer driver, and using the printer driver's own dialog box.
Also note that some printer drivers do not HAVE a landscape setting, because the printer can't DO landscape. You can't assume that everyone has a LaserJet or a Lexmark. A relative's computer still has a daisy-wheel printer. The "landscape" mode requires her to physically move the paper guides, put the paper in sideways, and select "landscape 11 X 8.5 paper" from the paper choices. There is no way to just select "landscape" on that computer and have it work.
Your boss can blow his little top off, with steam coming out his ears, but he can't change the law, the rules of internet security, or the limitations of the user's computer hardware. So you should have a camera ready, so you can photograph the steam when he finds these things out.
If you do find a way to do this, you could be violating federal law. And if you were ordered to crack into the user's computer so the boss can have his way, then the boss can be charged too.
The only right way to do this is to ASK the user to change his settings to landscape before printing the page.
Last edited by MidiMagic; Sep 13th, 2007 at 4:04 pm.
Daylight-saving time uses more gasoline
•
•
Join Date: Aug 2006
Posts: 999
Reputation:
Solved Threads: 1
I am not assuming that everyone can do this, MidiMagic. I am assuming that a specific individual, one of the upper-level staff for the company that retains my own for its IT purposes, when using an internal business form, has access to at least one business printer that can do this, and to a browser that can parse and use the CSS2 tag. Failing the tag, there won't be any changes and the system will print out in portrait style. I don't have to break into the other system, merely to have a specific piece of pre-defined CSS2 code in place in my own .css file. I fail to see how that violates the law.
Or are you somehow suggesting that the CSS2 code itself is illegal? I'll be happy to bring the topic up in the Geek's Lounge for discussion if that is the case.
Or are you somehow suggesting that the CSS2 code itself is illegal? I'll be happy to bring the topic up in the Geek's Lounge for discussion if that is the case.
Last edited by EnderX; Sep 14th, 2007 at 9:33 am.
"No trees were harmed in the production of this post. However, several electrons were severely inconvenienced."
Kumquat.
Kumquat.
An intranet is different. But you didn't say anything about that.
I was thinking of an advertising page where your boss wanted to change the printer settings of every user who accesses the advertising page. That would be illegal cracking
Although a CSS tag which selects landscape for just the one print job is a great idea, provided the printer can actually do landscape. It doesn't permanently change the settings.
If you are doing print to a network printer, you can put this in the settings for the network printer.
I have had too many trials in the past where I had a special printer set up, with special values in the driver registers, and then the application software comes along and resets the printer driver to "standard", destroying the settings necessary to use that printer. Or their reset destroyed the offset of the tractor-feed paper in use.
I was thinking of an advertising page where your boss wanted to change the printer settings of every user who accesses the advertising page. That would be illegal cracking
Although a CSS tag which selects landscape for just the one print job is a great idea, provided the printer can actually do landscape. It doesn't permanently change the settings.
If you are doing print to a network printer, you can put this in the settings for the network printer.
I have had too many trials in the past where I had a special printer set up, with special values in the driver registers, and then the application software comes along and resets the printer driver to "standard", destroying the settings necessary to use that printer. Or their reset destroyed the offset of the tractor-feed paper in use.
Daylight-saving time uses more gasoline
![]() |
Similar Threads
- Page size? (HTML and CSS)
- inserting code in css stylesheet (HTML and CSS)
- Background question (JavaScript / DHTML / AJAX)
- when use ".js" files (JavaScript / DHTML / AJAX)
- Master Page and CSS (ASP.NET)
- Random CSS Stylesheet selector exists? (JavaScript / DHTML / AJAX)
- CSS & menu (HTML and CSS)
- IE won't open *local* PHP files anymore! (Web Browsers)
- How do i get ppl to join my forum (Website Reviews)
- RSS Feed Readers (Geeks' Lounge)
Other Threads in the HTML and CSS Forum
- Previous Thread: How to: Excel Spreadsheet online??
- Next Thread: Firefox left-marin problem
| Thread Tools | Search this Thread |
appointments asp background backgroundcolor beta browser bug calendar cart cgi code codeinjection corporateidentity css design development displayimageinsteadofflash dreamweaver emailmarketing epilepsy explorer firefox flash form format google griefers hackers hitcounter hover html ide ie7 ie8 iframe image images internet internetexplorer intranet iphone javascript jpeg layout macbook maps marketshare microsoft mozilla multimedia navigationbars news offshoreoutsourcingcompany opacity opera optimization pnginie6 positioning problem scroll seo shopping studio swf swf. textcolor timecolor titletags url urlseparatedwords visual visualization web webdevelopment webform website windows7






