I would like to wrap the table in an environment, so that the table in-cell margins are reset and/or I have control over them.
It seems fancyhr is making this impossible to do, with the following approaches: Column and row padding in tables
\documentclass[12pt,a4paper]{abntex2} % Use A4 paper with a 12pt font size - different paper sizes will require manual recalculation of page margins and border positions
\usepackage[utf8]{inputenc}
\usepackage{fancyhdr} % Required for header and footer configuration
\usepackage[math]{cellspace}
\usepackage{lipsum}
\fancyhf{} % Clear default headers and footers
\renewcommand{\headrulewidth}{0pt}
\addtolength{\topmargin}{-4mm}
\addtolength{\bottommargin}{+2mm}
\addtolength{\footskip}{30mm}
\addtolength{\textheight}{-20mm}
\addtolength{\headsep}{+10mm}
\usepackage{fancyhdr} % Required for header and footer configuration
%%%%%%%%%%%% ----------- PACOTES/PACKAGES ----------- %%%%%%%%%%%%%%
\usepackage{marginnote} % Required for margin notes
\usepackage{wallpaper} % Required to set each page to have a background
\usepackage{lastpage} % Required to print the total number of pages
% \usepackage[left=1.3cm,right=2.0cm,top=1.8cm,bottom=5.0cm,marginparwidth=3.4cm]{geometry} % Adjust page margins
\usepackage{amsmath} % Required for equation customization
\usepackage{amssymb} % Required to include mathematical symbols
\usepackage{xcolor} % Required to specify colors by name
\usepackage{lipsum}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
%%%%%%%%%%%% ----------- PACOTES/PACKAGES ----------- %%%%%%%%%%%%%%
%%%%%%%% ---------- ALGUM PROBLEMA --------
\usepackage{pstricks}
% \usepackage{subfigure} %%%%%%%% Incompatibilidade/Incompatibility
\usepackage{caption} % legendas nas figuras
\captionsetup{justification=centering,labelfont=bf}
\usepackage{textcomp}
%%%%%%%% ---------- ALGUM PROBLEMA ---------
\usepackage{url}
\usepackage{comment}
% \usepackage[svgnames]{xcolor}
\ifpdf
\usepackage{pdfcolmk}
\fi
\usepackage{graphicx}
\usepackage{hyperref}
% \usepackage[outline]{contour}
\usepackage{tikz}
\usepackage{pifont}
\ifxetex
\usepackage{fontspec}
\fi
\usepackage[hmargin=1cm,top=4cm,headheight=50pt,footskip=5pt]{geometry}
\newenvironment{header-title}{\vspace{0pt}\center\bfseries\fontsize{7}{2}\selectfont\rmfamily \cellspacetoplimit 2pt \addtolength{\topmargin}{-5mm}}{}
\newenvironment{footer-title}{\flushleft\bfseries\fontsize{8.5}{3}\selectfont\rmfamily}{}
\fancyhead[ce,co,le,lo,re,ro]{} %% clear out all headers
\bgroup
\def\arraystretch{}
\fancyhead[c]{%
% 1 is the default, change whatever you need
\begin{tabular}{|m{3.0cm}|m{8cm}|m{2.5cm}|}
\hline
\begin{center}
\includegraphics[height=1.5cm,width=3cm]{logo.png}
\end{center}
&
\begin{header-title}
Laudo Técnico de Apreciação de Riscos e \newline
Análise de Conformidade Legal Máquina NR-12 \newline
Segurança no Trabalho em Máquinas e Equipamentoso.
\end{header-title}
& \centering
\tiny{Página
\thepage\ de
\pageref{LastPage}\
data: 10/04/2021\
} \[10mm]
\tabularnewline
\hline
\end{tabular}%
\egroup
}
\fancyfoot[ce,co,le,lo,re,ro]{} %% clear out all headers
\fancyfoot[c]{%
\begin{tabular}{|m{3cm}|m{8cm}|m{2.5cm}|}
\hline
\begin{center}
\includegraphics[height=1cm,width=4cm]{logo.png}
\end{center}
& % \centering
% \begin{tabular}{c}
\begin{footer-title}
Elaborado por: Wagner José Branquinho, \newline
Engenheiro Mecânico e de Segurança do Trabalho. \newline
\begin{center}
CREA 0601546708
\end{center}
\end{footer-title}
% \end{tabular}
& \centering
\tiny{Página
\thepage\ de
\pageref{LastPage}\
data: 14/10/2020\
rev. 0}\tabularnewline
\hline
\end{tabular}%
}
\begin{document}
\pagestyle{fancy}
\section{Secção 1}
\lipsum[1]
% \AddToShipoutPicture{\BackgroundStructure} % Set the background of
%each page to that specified above in the header information section
% \pagebreak
\section{Secção2}
\lipsum[3]
\section{Título parte}
\lipsum[4]
\section{Secção 1}
\lipsum[1]
% \AddToShipoutPicture{\BackgroundStructure} % Set the background of
%each page to that specified above in the header information section
% \pagebreak
\section{Secção2}
\lipsum[3]
\section{Título parte}
\lipsum[4]
\end{document}
I would like to make this highlighted text to close on the top of the cell.

Very close reproduction can be found here: https://www.overleaf.com/6525723987nfydcfgtqyrg

codeshould be self contained so that it can be compiled to show the problem -- if the desire is to only have afancyhdrwould another solution be okay or is it only with atabularenviron – js bibra Apr 11 '21 at 00:29\documentclassyou use, where is defined{header-title}, what is the problem? Please provide MWE (Minimal Working Example), a small but complete document which reproduce your problem. – Zarko Apr 11 '21 at 02:57The document class I use is abntex2; but i'm pretty sure it has nothing to do with it. Because it an norm-specific to Brazilian technical documents and their table is very different, when you use their examples/ambients for writing them.
I would like to have a table inside my header and footer. If it didn't use fancyhdr, I would totally be satisfied with this other solution
– BuddhiLW Apr 11 '21 at 15:03