I have a requirement to support pretty nice printing in IE8. Today I ran into a problem with a page using some HTMl5 and CSS functionality (sections). The problem only occurs when printing. Considering the example below, it should generate some underlined text. It works great. But this is not emphasized in printing. This can be βfixedβ by changing the βsectionβ to βdivβ, but for various reasons I would prefer not to.
Does anyone have any tips? This doesn't seem to be a problem with javascript executing during the preview, because I can add a window.onload event to the page so that it populates the div with content, and this works fine in print preview. And plain CSS works fine when previewing prints; if I didnβt have a ".SigLine" nested inside a ".Signature", this would work perfectly in the preview. But it seems that the CSS class of the "Section" tag is somehow ignored, so the nested "SigLine" div does not consider itself a child of the "Signature" element.
Here is a complete working example.
<html> <head> <style type="text/css" media="screen,print"> .Signature .SigLine{border-bottom:solid 1px #000} </style> </head> <body> <section class="Signature"> <div class="SigLine" style="width: 400px;">I should be underlined...</div> </section> </body> </html>
source share