# Table will not center (and it is spilling off the right side of the page)

I just generated this table using Excel2LaTeX:

Even though I enclosed the table in \begin{center} the table did not get centered. The table still sticks out the right side. Is there somehow that I can easily fix this?

This is the code for the table:

\begin{center}
\begin{tabular}{rrrrrrr}

&    MSRP & Vol. Disc. & Promo. Allow. & Discount/Sale & Promo/Sale & Income/Sale \\

{\bf All Round} & {\bf \$5.49} & {\bf 30.0\%} & {\bf 13.0\%} & {\bf \$1.65} & {\bf \$0.71} & {\bf \$2.36} \\

{\bf All Round (suggestion)} & {\bf \$5.49} & {\bf 25.0\%} & {\bf 20.0\%} & {\bf \$1.37} & {\bf \$1.10} & {\bf \$2.47} \\

Believe &  \$3.99 & 33.5\% & 15.6\% & \$1.34 &  \$0.62 & \$1.96 \\

Best Help &  \$4.59 & 34.5\% & 13.3\% & \$1.58 &  \$0.61 & \$2.19 \\

Coughcure &  \$4.69 & 28.5\% & 16.7\% & \$1.34 &  \$0.78 & \$2.12 \\

Defogg &  \$4.09 & 22.5\% & 11.1\% & \$0.92 &  \$0.45 & \$1.37 \\

Dripstop &  \$4.09 & 21.5\% & 13.3\% & \$0.88 &  \$0.54 & \$1.42 \\

{\bf Dryup} & {\bf \$4.79} & {\bf 21.5\%} & {\bf 15.6\%} & {\bf \$1.03} & {\bf \$0.75} & {\bf \$1.78} \\

Effective &  \$4.09 & 30.0\% & 14.4\% & \$1.23 &  \$0.59 & \$1.82 \\

End &  \$4.49 & 30.0\% & 14.4\% & \$1.35 &  \$0.65 & \$1.99 \\

Extra &  \$4.09 & 31.0\% & 12.5\% & \$1.27 &  \$0.51 & \$1.78 \\

\end{tabular}
\end{center}

-
This is basically a duplicate of this question. –  TH. Nov 5 '10 at 9:36

It might be more aesthetically pleasing and easier to maintain if you inserted some line breaks (\\) into your row and column headers that would reduce the overall width of the table. Trying to manually position the table with hspace or similar could wind up looking bad if your page formatting changes in the future.

-

Well your table is too large, so it will either stick out on the right, on the left or on both sides. You can move it to the left with \hspace*{-1cm}\begin{tabular}..., you can center it with e.g. \makebox[0pt]{tabular}

-

You could surround the All Round (suggestion) with \llap. That will let it stick into the left margin a bit.

-

For my PhD-Thesis i've used the trick explained by Stefan Kottwitz. Here's the copied example from his website:

\documentclass[a4paper,10pt]{article}
\usepackage[english]{babel}
\usepackage{blindtext}
\usepackage{tabularx}
\begin{document}

\blindtext
\bigskip

\noindent\makebox[\textwidth]{%
\begin{tabularx}{1.5\textwidth}{XX}
\blindtext & \blindtext
\end{tabularx}}

\bigskip
\blindtext

\end{document}


The relevant thing is to include your large-ish float into

\noindent\makebox[\textwidth]{%
%FLOAT
}


Oh, and BTW: I also suggest you look at the booktabs package, it's great for enhancing the display of your tables...

-
+1 for booktabs. –  TH. Nov 5 '10 at 9:34
This is the best suggestion on this page. –  gregmacfarlane Oct 18 '12 at 1:38
Absolutely fantastic. –  alexy13 May 14 '13 at 21:42

Use the adjustbox package with the center argument, e.g.,

\documentclass{article}
\begin{document}
\begin{tabular}{rrrrrrr}

&    MSRP & Vol. Disc. & Promo. Allow. & Discount/Sale & Promo/Sale & Income/Sale \\

{\bf All Round} & {\bf \$5.49} & {\bf 30.0\%} & {\bf 13.0\%} & {\bf \$1.65} & {\bf \$0.71} & {\bf \$2.36} \\

{\bf All Round (suggestion)} & {\bf \$5.49} & {\bf 25.0\%} & {\bf 20.0\%} & {\bf \$1.37} & {\bf \$1.10} & {\bf \$2.47} \\

Believe &  \$3.99 & 33.5\% & 15.6\% & \$1.34 &  \$0.62 & \$1.96 \\

Best Help &  \$4.59 & 34.5\% & 13.3\% & \$1.58 &  \$0.61 & \$2.19 \\

Coughcure &  \$4.69 & 28.5\% & 16.7\% & \$1.34 &  \$0.78 & \$2.12 \\

Defogg &  \$4.09 & 22.5\% & 11.1\% & \$0.92 &  \$0.45 & \$1.37 \\

Dripstop &  \$4.09 & 21.5\% & 13.3\% & \$0.88 &  \$0.54 & \$1.42 \\

{\bf Dryup} & {\bf \$4.79} & {\bf 21.5\%} & {\bf 15.6\%} & {\bf \$1.03} & {\bf \$0.75} & {\bf \$1.78} \\

Effective &  \$4.09 & 30.0\% & 14.4\% & \$1.23 &  \$0.59 & \$1.82 \\

End &  \$4.49 & 30.0\% & 14.4\% & \$1.35 &  \$0.65 & \$1.99 \\

Extra &  \$4.09 & 31.0\% & 12.5\% & \$1.27 &  \$0.51 & \$1.78 \\

\end{tabular}
\end{document}


-