How to delete the horizontal space between the text and a line to write text on?
To clarify I'm referring to the space that comes after the ":" and that is before the line.
\documentclass{article}
\usepackage{tabularx}
\newcolumntype{Y}{>{\centering\arraybackslash}X}
\begin{document}
\noindent
\begin{center}
\begin{tabularx}{1\textwidth}{Yp{-20cm}Y}
name:&& name\\[-2ex]
&& \hrulefill \\[1ex]
&& \\[1ex]
&&
\end{tabularx}
\end{center}
\end{document}
The above comes from adapting the last code from this answer https://tex.stackexchange.com/a/591858/
Thank you in advance.


p{-20cm}you can not have a parbox with a negative\hsizefor linebreaking. – David Carlisle Apr 19 '21 at 18:06