Forum Moderators: not2easy

Message Too Old, No Replies

misbehaving border on div in print version of style sheet

         

zollerwagner

7:32 am on Aug 31, 2004 (gmt 0)

10+ Year Member



I'm preparing a print version of the stylesheet for a site.

I want to print a border around my contact information. This info is in a div called "footer".

If I put "border: 1pt solid #dde;" I get no top or bottom border in IE6.

The style sheet checks out fine the W3C validator.

Then if I keep that first line about border and this next line: "border-top: 1.2pt solid #99f;" -- I get what looks like the correct top border (different color from the rest) and the correct bottom border.

Yes, I can change the color and everything looks great
in IE.

Opera doesn't print the border at all and Netscape prints the fat top border and no border on the right.

What is going on? Am I doing something wrong? Are printed borders just unreliable?

---------

#footer {
border: 1pt solid #dde;
border-top: 1.2pt solid #dde;
margin: 0;
padding: .5em 1em 1.2em 1em;
text-align: left;
font-size: 9pt;
}

SuzyUK

7:50 am on Aug 31, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



could it be rounding errors caused by the padding being in em's?

I'm wondering if all measurements need to be in pts in a print stylesheet.. a bit like mixing px's and em/% onscreen

Suzy

zollerwagner

8:11 am on Aug 31, 2004 (gmt 0)

10+ Year Member



Good question!

I've just now tried moving it all to pts from ems and get the same results in all three browsers. Wish it had been that easy.

I also tried defining all of the sides separately. No luck with any of the three browsers.

Another related problem is that when the div occurs at the top of a second page (during the print), the border disappears even with IE.

I'm thinking that it may be a problem with borders on divs with a print style sheet.