# A table with \hlines in a tikzposter block

I would like to have a table with \hlines fit inside of a tikzposter block, but the lines stretch outside of the block, as shown in the following image:

\documentclass[25pt, a0paper, portrait]{tikzposter}

\usepackage{tabularx}

\begin{document}

\block{Kysymyspatterin kysymykset}{
\begin{tabularx}{\textwidth}{c|p{0.4\textwidth}}
Numero& Kysymys (3--9 määrällisiä, loput laadullisia) \\
\hline\hline
1& Text here\\
\hline
\end{tabularx}

}

\end{document}


How could the length of the \hlines be limited to the width of the table? Changing the second column to the X type does nothign to alleviate the issue.

• By NOT using tabularx if you don't have at least one X column. – Bernard Apr 10 at 15:44

Quite simple: use \linewidth instead of \textwidth

\documentclass[25pt, a0paper, portrait]{tikzposter}

\usepackage{tabularx}

\begin{document}

\block{Kysymyspatterin kysymykset}{
\begin{tabularx}{\linewidth}{c|X}
Numero& Kysymys (3--9 määrällisiä, loput laadullisia) \\
\hline\hline
1& Text here\\
\hline
\end{tabularx}

}

\end{document}