[Tex/LaTex] Tabular Horizontal Line Stops

tables

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?

enter image description here

\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.

% arara: pdflatex

\documentclass{article}
\usepackage{showframe} % for demo that the table fits into the page limits
\usepackage{booktabs}

\begin{document}
\begin{table}
\centering
\caption{the caption}
\begin{tabular}{lp{1.5cm}ll}
    \toprule 
    \textbf{GENE} & \textbf{Allele of interest} & \textbf{Outcomes} & \textbf{Dominance} \\
    \midrule  
    MAOA    & 2.5, 3, 5 & Agression               & Recessive, Sex-selective \\
    DAT1    & 10R       & ADHD                    & hz.\ disadvantage \\
    DRD4    & 7R        & ADHD                    & - \\
    5-HTT   & 14 (s)    & Negative Thoughts, Fear & Dominant \\
    TRI     & S         & Depression              & Codominant \\
    DRD2    & A         & Alcoholism              & Dominant \\
    DRD5    & 148       & ADHD                    & - \\
    S000005 & A         & Stress                  & - \\
    S000006 & T         & ADHD                    & - \\
    MAOCA1  & 115+      & Alcoholism              & Sex selective \\ 
    \bottomrule
\end{tabular}
\end{table}
\end{document}

enter image description here


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 using p{}-columns or use an tabularx instead of the tabular*.