how to set a header and footer for each page?

Posted In HTML & CSS
  • rahul-reji 5 months 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 5 months 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"); ? >

  • vijay-singh 1 month ago
    Hello you should set them by setting up a .php file or by setting it up by the CSS of your webpage or the website you are trying to build.If you have a site on wordpress then you can add header footer plugins also, and if you know a bit of coding then you can edit it in the header footer code file and build it.

    Hello you should set them by setting up a .php file or by setting it up by the CSS of your webpage or the website you are trying to build.If you have a site on wordpress then you can add header footer plugins also, and if you know a bit of coding then you can edit it in the header footer code file and build it.

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!