# Oversized colored row in beamer block

As a follow up to this question, I am trying to insert tables in my beamer presentation so that they have the same style as blocks. However, I want to avoid using rules in my tables, and I am trying to used colored rows (with package xcolor) to improve readability.

Here is an example of my code:

\PassOptionsToPackage{table}{xcolor}
\documentclass{beamer}

\usepackage{tabularx}

\definecolor{RowColorOdd}{rgb}{0.914,0.914,0.953}
\definecolor{RowColorEven}{rgb}{1,1,1}

\usetheme{Darmstadt}
\usecolortheme{seahorse}

\begin{document}

\begin{frame}[plain]
\begin{block}{\centering\begin{tabularx}{1\textwidth}{@{}p{0.56\textwidth}@{}X@{}X@{}}\textcolor{white}{Header 1} & \textcolor{white}{Header 2} & \textcolor{white}{Header 3}\end{tabularx}}%
\centering
\rowcolors{1}{RowColorOdd}{RowColorEven}%
\begin{tabularx}{1\textwidth}{@{}p{0.56\textwidth}@{}X@{}X@{}}%
1.1 & 1.2 & 1.3 \\%
2.1 & 2.2 & 2.3 \\%
3.1 & 3.2 & 3.3 \\%
4.1 & 4.2 & 4.3
\end{tabularx}%
\end{block}%
\end{frame}

\end{document}


However, this code results in the following table, where rows are oversized with respects to the block frame:

Any idea how I can fix this ?

-

## 1 Answer

for both tabular use:

\begin{tabularx}{\dimexpr\textwidth-2\tabcolsep}{@{}p{0.56\textwidth}@{}X@{}X@{}}%


-
Thanks for your answer! I understand your solution, and it works, but now the rows are undersized w/r to the block, probably due to the block inner margins. Is there a way to take these margins into account so that the rows are exactly as wide as the block ? –  AldurDisciple May 16 '13 at 13:36
use it for both tabulars. The box has an inner border. You can use as an alternative package tcolorbox –  Herbert May 16 '13 at 13:53