I am using Tabular to make a simple table. For three columns, my table displayed fine. When I added a fourth column, the horizontal lines stopped reaching all the way across my table. I also have a little bit of horizontal line that sticks out on the left side of the table. What went wrong with my table?
\begin{tabular*}{0.75\textwidth}{@{\extracolsep{\fill } } | l | c | c | c || }
\hline
\textbf{GENE} & \textbf{Allele of interest} & \textbf{Outcomes} & \textbf{Dominance} \\
\hline \hline
MAOA & 2.5, 3, 5 & Agression & Recessive, Sex-selective \\ \hline
DAT1 & 10R & ADHD & hz. disadvantage \\ \hline
DRD4 & 7R & ADHD & - \\ \hline
5-HTT & 14 (s) & Negative Thoughts, Fear & Dominant \\ \hline
TRI & S & Depression & Codominant \\ \hline
DRD2 & A & Alcoholism & Dominant \\ \hline
DRD5 & 148 & ADHD & - \\ \hline
S000005 & A & Stress & - \\ \hline
S000006 & T & ADHD & - \\ \hline
MAOCA1 & 115+ & Alcoholism & Sex selective \\ \hline
\end{tabular*}
Best Answer
If I may, I would recommend to redesign the complete table. The code posted above is much to wide.
The problem with your table was that the given width of
0.75\textwidth
was exceeded by the tables content. The\hlines
stopped, where you wanted them to stop, but the text didn't. You will have to reduce the columns width usingp{}
-columns or use antabularx
instead of thetabular*
.