0
.bPageBlock .pbBody table {
    min-width: 90% !important;
    max-width: 90% !important;
    width: 90% !important;
    margin: 0 auto !important;
  }
.bPageBlock .pbBody td {
    width: 45% !important;
    min-width: 90% !important;
    max-width: 90% !important;
    margin: 0 auto !important;
    padding-left:  50px;
    padding-top:  15px;
  }
.bPageBlock .pbBody th {
    width: 45% !important;
    margin: 0 auto !important;
  }
.bPageBlock .pbBody span{
    width: 45% !important;
    max-width: 45% !important;
  }

this is my css for a visualforce page that prints as pdf.

I am able to print normal apex:outputlabels in proper tables and the CSS is consistant.

But, If i have an apex:outputlabel inside an apex repeat tag, then i cant format the table and it comes up very very weirdly. enter image description here Where as on a normal apex:outputlabel which is rendered as a table. the table tags seem to work.

I want to make sure the value never increase more than 45% of the page, if they do they have to wrap, which html would do automatically based on width.

0

Not sure how your markup is formatted but there are times with apex component tags are overkill.

Simply use

<label for="ELEID">{![var].[value|api name]}</label>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.