On my page, I have a logo in the upper left corner with a repeating image creating a banner extending over the the right of the page. They work nicely using background images.
.logo {
background: white url('img/logo-sml.png') center no-repeat;
width: 81px; height: 62px;
outline: 7px solid #D15F08;
padding: 8px 2px;
position: absolute; top: 15px; left: 15px;
}
.topstripe {
background: transparent url('img/bg_top.png') repeat-x scroll 0 0;
height: 39px;
margin-left: 10px;
}
Many of my visitors like to print the pages, and I would like the logo and stripe to appear when printing. I have read pages that discuss a separate CSS page for printing. Where I have a repeating image, is this my only option, or is there a way to get an image in an IMG tag to repeat?
i.e. something like:
<img src="img/bg_top.png" style:"display: repeat-x"/>
But in a way that will print.
@media print { /* CSS here */ }
. – agrm@media print
, it appeared that the goal was to create a dumby that was invisible normally, but then became visible when printing. In such a case, the repeat-x still causes a problem, right? Or does that tag force it to print, so I just repeat the same CSS, but now within the tag? – Thomas@media print
will not force the browser to print background images. When that's said, what does your repeating background/stripe look like? Will you be able to simply stretch the image to a width of100%
? – agrm