![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I have always found that CSS is one of the most frustrating things I have to deal with. Apart from the incredible oversights in its design (like the fact that there is no provision for defining constants), it does not give any feedback, apart from what you do (or often don't) get on the screen. I have recently been working on a program to print envelopes, and got it working reasonably well, but there were a few minor things where IE6 didn't seem to be working quite correctly. I had always heard that Firefox was better than Internet Explorer, so I wondered how it would handle this situation. To my surprise, I found that it did a substantially worse job than IE 6. In an attempt to understand what was going on, I did a bit of experimenting, which left me more confused than ever. You can see my experimental page at http://www.corybas.com/Swindle.htm. This simply contains two copies of a sample envelope, suitable for printing on a C6 envelope (114 x 162 mm). The garish colours and unsuitable fonts are purely to make it easier to see what is going on. In the body style the default font is defined as Times new Roman. Separate styles are defined for the 'address' and 'return' areas of the envelope. In the top copy the style: .address_p { font-size: 1.1em; font-family:"Courier New", Courier, mono; line-height: normal; margin-top: 0; margin-bottom: 0.05em; color:#e00000;} is defined, and is applied to the cell containing the address. A similar style is defined for the cell containing the return address. In the bottom copy the style is defined simply as: .address_p { font-size: 1.1em; font-family:"Courier New", Courier, mono; line-height: normal; margin-top: 0; margin-bottom: 0.05em; color:#e00000;} and is applied directly to each paragraph of the address, with a similar style for the return. For @media print {} these styles are overridden by similar styles defining the font as Arial, the colour as black, and specifying a smaller font size. In IE6 and IE7, the top copy behaves exactly as I expected in both normal and the print versions. However in the bottom copy the size specification is ignored, and both the address and the return appear in the default paragraph size. In Firefox the screen version behaves in the same way as in IE6, but in the print version the font specification is also ignored in both cases. Everything I have read leads me to expect that having defined the style 'address', it should behave exactly the same whether I apply it directly to each paragraph of the address, or to the cell containing the address, but clearly this is not so. Can anyone explain why? Also is it normal for Firefox to ignore the font specification in the printed version in both cases? This would appear to be a considerable failure on its part. (I have simply parked this page on one of my public sites to make it accessible, but I have made no attempt to integrate it into the site. The original page was produced by a complex PHP program, but I used IE6 to view the source, and saved it as an HTML file.) |
#3
| |||
| |||
|
|
Why are you trying to print envelopes from your browser? |
#4
| |||
| |||
|
|
I have recently been working on a program to print envelopes, and got it working reasonably well, but there were a few minor things where IE6 didn't seem to be working quite correctly. I had always heard that Firefox was better than Internet Explorer, so I wondered how it would handle this situation. To my surprise, I found that it did a substantially worse job than IE 6. In an attempt to understand what was going on, I did a bit of experimenting, which left me more confused than ever. |
#5
| |||
| |||
|
|
On Sat, 04 Apr 2009 08:43:30 -0700, Bonnie <bonnie@pixel[occam]plum.com> wrote: Why are you trying to print envelopes from your browser? Is there any law which says I shall not print envelopes from my browser? Every couple of years Microsoft bring out new versions of their software, and every time they change the interface so that simply learning to use it requires a considerable effort, they make it harder and harder to do what you want to do, as opposed to what they think you should do, and every time it is slower, even though it is running on a much faster microprocessor. It has got so bad that the performance of the latest versions of their software is little better than what we got from CPM on a 10 MHz microprocessor 25 years ago. About eight years ago I organised a function for about 100 people. I used Word/mail merge to prepare the mailing list, and it did the job quite efficiently and reasonably painlessly. A few years later, when I organised the next function, everything had changed, and I had great difficulty getting Word to do what I wanted. Another couple of years, and it seemed that Microsoft had decided not to allow me to do the job at all. I eventually managed to get the job done, after a fashion, but I said enough! I had become moderately proficient at PHP programming, and a quick look at C++ convinced me that although it superficially resembled PHP there were enough subtle differences that I would never be able to program in both at once, so I decided to stick with PHP. I now have a program which does what I want to do, and which I understand, so I can readily add new features. I appreciate that talking to the printer through the browser is not ideal, and the next step is to learn how to make PHP talk directly to the printer, but until then it enables me to get the job done. I don't mind if you think I am mad, but I did ask a legitimate question about functionality which was presumably provided in the expectation that it would be used. |
#6
| |||
| |||
|
|
Why are you trying to print envelopes from your browser? Is there any law which says I shall not print envelopes from my browser? Every couple of years Microsoft bring out new versions of their software, and every time they change the interface so that simply learning to use it requires a considerable effort, they make it harder and harder to do what you want to do, as opposed to what they think you should do, and every time it is slower, even though it is running on a much faster microprocessor. It has got so bad that the performance of the latest versions of their software is little better than what we got from CPM on a 10 MHz microprocessor 25 years ago. |
|
About eight years ago I organised a function for about 100 people. I used Word/mail merge to prepare the mailing list, and it did the job quite efficiently and reasonably painlessly. A few years later, when I organised the next function, everything had changed, and I had great difficulty getting Word to do what I wanted. Another couple of years, and it seemed that Microsoft had decided not to allow me to do the job at all. I eventually managed to get the job done, after a fashion, but I said enough! |
|
I had become moderately proficient at PHP programming, and a quick look at C++ convinced me that although it superficially resembled PHP there were enough subtle differences that I would never be able to program in both at once, so I decided to stick with PHP. I now have a program which does what I want to do, and which I understand, so I can readily add new features. I appreciate that talking to the printer through the browser is not ideal, and the next step is to learn how to make PHP talk directly to the printer, |
#7
| |||
| |||
|
|
Did you upgrade your copy of Word over this time? Were you aware (are you aware?) that you could still be using your original version of Word? I don't understand why you kept 'upgrading' once you understood the version you had. |
|
I don't believe you will ever be able to make this happen. PHP is server side. Nothing runs on the client. You could, however, try looking at javascript for this. |

![]() |
| Thread Tools | |
| Display Modes | |
| |