0

I am having a visual force page where in i want a header image followed by content , but i want content after the header image with the current code everything was fine in first page but from page 2 the header image is coming over content, here is my code:

<apex:page renderAs="pdf" applyBodyTag="false" standardController="PageContent">
<head>
    <style type="text/css" media="print">
        @page {
            size: a4;
            /* Adjust margins as needed */
            @top-center {
                content: element(header);
            }
        }
        body {
            font-family: Arial, Helvetica, sans-serif;
            margin-top:100px;
        }
        div.header {
            padding: 10px;
            position: fixed;
            left: 0;
            top: 0;
            right: 0;
            z-index: 1; 
        }
        div.content {
            margin-top: 350px;                
        }
        .vesselTypeLabel {
            width: 18% !important;
        }
        p {
            font-size: 12px;
            font-family: Arial, Helvetica, sans-serif;
        }
    </style>
</head>
<body>
    <div class="header">
        <apex:image id="Logo" value="{!$Label.TestLabel}" width="700px" height="100"/>
    </div>

    <div class="content" style="margin-top: 150px !important ;">
        <apex:outputText escape="false" value="{!Content.DynamicPDFContent__c}" style="white-space: pre-wrap;padding-top:100px;"></apex:outputText>
    </div>
</body>

</apex:page>

0

You must log in to answer this question.

Browse other questions tagged .