Hemanth M C
Hemanth M C

Reputation: 436

how to set maximum width for header or for body content other than giving width 100%

I want to set the maximum width for body or for header without using width:100% how to achieve the maximum width for any body content.

Normally when I print the content in wicked-pdf the header width is not matching with the body width if I give the width: 104% then it is matching with body.

Even if I specify width:100% for header is not working properly it is not occupying full width in pdf report even default is also 100% but it is working fine with width:104% what is the reason for this and more over the problem is font size will become condensed or become small if we specify the width more than 100% I don't want that to happen so can any one help me!

observe the header table and bellow lines width is not matching. after lines margin is applied

enter image description here

Upvotes: 0

Views: 1404

Answers (3)

Andrew_tainton
Andrew_tainton

Reputation: 271

I think you in on of your parent tags there must be some sort of padding or margin that limits the size so that it is not 100% of the page.

If your document is set pixel width you can use:

max-width:120px;

Base on your information it sounds like there is a parent style that is messing with the width, if you dont want the width to be smaller than the page you can use the alternative value:

min-width:120px; 

But I suggest looking at the other tags and their styles.

Upvotes: 1

Luís P. A.
Luís P. A.

Reputation: 9739

Try replace the 100% to this:

   display: block;
   position: relative;
   left: 0px;
   right: 0px;

Upvotes: 1

Rajdeep Singh
Rajdeep Singh

Reputation: 17834

I think you need this css property

max-width: 100%;

Upvotes: 0

Related Questions