how to set a header and footer for each page?

Posted In HTML & CSS
  • rahul-reji 2 weeks ago
    I am simulating a print preview. 
    How do i set custom header and footer for each page?
    I am currently using the following CSS.
    
     .header {
         color: gray;
         font-size: 14.6px;
         text-align: right;
         margin-right: 1%;
         padding-top: 1%;
         top: 0;
     }
    
     .footer {
        color: gray;
        font-size: 13.3px;
        text-align: right;
        margin-right: 1%;
        bottom: 0;
    }

    I am simulating a print preview. How do i set custom header and footer for each page? I am currently using the following CSS.

    .header { color: gray; font-size: 14.6px; text-align: right; margin-right: 1%; padding-top: 1%; top: 0; }

    .footer { color: gray; font-size: 13.3px; text-align: right; margin-right: 1%; bottom: 0; }

  • robert-bremsat 1 week ago
    Hello Rahul if you want to include an header and footer on every page you should build an .php file for the header and some .php file for the footer.
    In this files you can add your header and footer code.
    
    *CSS in general is only for formating and styling the visual part of the page.*
    
    You can include these files via 
    
    < ? php include("header.php"); ? >
    	Your content here
    < ? php include("footer.php"); ? >

    Hello Rahul if you want to include an header and footer on every page you should build an .php file for the header and some .php file for the footer. In this files you can add your header and footer code.

    CSS in general is only for formating and styling the visual part of the page.

    You can include these files via

    < ? php include("header.php"); ? > Your content here < ? php include("footer.php"); ? >

Please login or signup to leave a response.

Login

or Sign Up

Sign Up

or Login
×
Want to create your own SAAS?

I can teach you to create your own Software as a Service. Click here to learn more!

Visit SAAS Adventure!