this is my first question here.
I want to make my table look like the block to have a consequent style.
Questions:
- How to create that shaded transition from the table headline to the body (like the block)
- How to add the shadow. (Different solutions on this forum dont seem to work for my code..)
Here is my minimalistic code which produces the following output:
\documentclass{beamer}
\usetheme{Berlin}
\setbeamertemplate{blocks}[rounded][shadow=true]
% Packages
\usepackage[USenglish]{babel}
\usepackage{times}
\usepackage{tikz}
\usepackage{parskip}
\usepackage{tabularx}
\usepackage{booktabs}
\usepackage{colortbl}
% This is for rounded corners
\usetikzlibrary{calc}
\pgfdeclarelayer{background}
\pgfdeclarelayer{foreground}
\pgfsetlayers{background,main,foreground}
% Define colors
\definecolor{TblTitle}{RGB}{38,38,134}
\definecolor{TblBody}{RGB}{233,233,243}
\begin{document}
\begin{frame}
\begin{block}{Block 1}
\begin{itemize}
\item item 1
\item item 2
\end{itemize}
\end{block}
\begin{tikzpicture}
\node(tbl){
\begin{tabularx}{\textwidth}{p{0.5\textwidth}p{0.5\textwidth}}
\textcolor{white}{Column 1} & \textcolor{white}{Column 2} \\
\begin{itemize}
\item item 3
\item item 4
\end{itemize} &
\begin{itemize}
\item item 5
\item item 6
\end{itemize} \\[-1em]
\end{tabularx}};
\begin{pgfonlayer}{background}
\draw[rounded corners,top color=TblTitle,
bottom color=TblTitle,draw=white]
($(tbl.north west)+(0.12,0)$)
rectangle ($(tbl.north east)-(0.12,0.9)$);
\draw[rounded corners,top color=TblBody,
bottom color=TblBody,draw=white]
($(tbl.south west)+(0.12,0.5)$)
rectangle ($(tbl.south east)-(0.12,0)$);
\draw[top color=TblBody,bottom color=TblBody,draw=TblBody]
($(tbl.north east)-(0.13,0.6)$)
rectangle ($(tbl.south west)+(0.13,0.2)$);
\end{pgfonlayer}
\end{tikzpicture}
\end{frame}
\end{document}
Best Answer
How about this: