Next my friend, once I had to do it too, it’s quite boring rsr but it worked.
maybe not the best way to do it but this code helps you.
*{
margin:0;
padding:0;
}
.conteudo_page{
position:absolute;
top:0;
left:0;
width:100%;
height:95%;
padding-bottom: 5%;
background-color: red;
}
.conteudo_page2{
position:absolute;
top:100%;
left:0;
width:100%;
height:95%;
padding-bottom: 5%;
background-color: yellow;
}
.page_number{
position:absolute;
top:95%;
left:0;
width:100%;
height:5%;
background-color: blue;
display: none;
}
.page_number2{
position:absolute;
top:195%;
left:0;
width:100%;
height:5%;
background-color: blue;
display: none;
}
.number_page{
text-align: center;
vertical-align: middle;
margin-top: 20px;
}
@media print{
.page_number{
display: block;
}
.page_number2{
display: block;
}
.conteudo_page{
padding-bottom: 0;
}
.conteudo_page2{
padding-bottom: 0;
}
}
<html>
<body>
<div class="conteudo_page">
<h1>pagina 1 aqui</h1>
</div>
<div class="page_number">
<p class="number_page">Página 1</p>
</div>
<div class="conteudo_page2">
<h1>pagina 2 aqui</h1>
</div>
<div class="page_number2">
<p class="number_page" style="">Página 2</p>
</div>
</body>
</html>
try creating an html with this code to test.
basically what I did was create a div
that Voce will put in what you want on page 1.
<div class="conteudo_page">
<h1>pagina 1 aqui</h1>
</div>
It will take up 100% of the screen. however in 5% of it has a div that will appear only in the print and with the page number, there you can put whatever you want as a footer:
<div class="page_number">
<p class="number_page">Página 1</p>
</div>
i put Page 1. and then you follow the same principle for the other pages you want.
Obs: you have to do their classes like I did in the css part:
and also mandalas appear and reduce padding at printing time:
.page_number{
position:absolute;
top:95%;
left:0;
width:100%;
height:5%;
background-color: blue;
display: none;
}
@media print{
.page_number{
display: block;
}
.conteudo_page{
padding-bottom: 0;
}
}
hope I’ve helped
Remembering that you need to disable the header and footer of your browser
So you removed the header and the footer and the page numbers went away together is this?
– hugocsl
Exactly that.
– Pedro
Dude if it’s small chapters that only fit one per page you might get a solution, but if it’s a long text run where you can’t break into sessions that fit on a page then it gets complicated. If it’s just one content per page ai is possible using CSS
– hugocsl