Rubberduck1337106092
Rubberduck1337106092

Reputation: 1344

How to change font-size of printable div

how can i change the font-style of the div i wwant to print?

this is the styling

@page {
    size: A4;
    margin: 0;
}
@media print {
    .page {
        margin: 0;
        border: initial;
        border-radius: initial;
        width: initial;
        min-height: initial;
        box-shadow: initial;
        background: initial;
        page-break-after: always;
    }
    html, body {
        width: 210mm;
        height: 297mm;
    }
}

Example:

html, body {
        width: 210mm;
        height: 297mm;
        font-size: 1mm;
    }

i tried everything the font-size is not getting smaller what am i doing wrong? Any help is appreciated..

Upvotes: 2

Views: 283

Answers (1)

bassxzero
bassxzero

Reputation: 5041

This should work. You should be able to see the changes in the print preview window. If you don't see the changes try adding !important to the css rule.

@media print {
 div {
   font-size: 1mm;
/*   font-size: 1mm !important;*/
  }

 /*Also move your @page css inside you @media css */
 @page {
     size: A4;
     margin: 0;
  }

}

Upvotes: 1

Related Questions