Centering text in tables problems with colortabs
Page 3 of the user guide for the multirow
package explains how to deal with problems caused by certain interactions between the colortbl
and multirow
packages. I believe the following modified form of your MWE, which incorporates the workaround described in the user guide, meets your needs to center the contents of the four cells which, so far, aren't centered correctly.
\documentclass{article}
\usepackage{booktabs,multirow}
\usepackage[dvipsnames,svgnames,table]{xcolor}
\begin{document}
\begin{table}
\centering
\setlength{\aboverulesep}{0pt}
\setlength{\belowrulesep}{0pt}
\setlength{\extrarowheight}{.75ex}
\begin{tabular}{|>{\columncolor{LightSteelBlue}}c| c | c | c|}
\toprule
\rowcolor{LightSteelBlue} & & & \\
\rowcolor{LightSteelBlue}
& \multirow{-2}{*}{Mann} & \multirow{-2}{*}{Kvinne} & \multirow{-2}{*}{Totalt} \\
\midrule
\O nsker & & & \\
Ballbinge & & & \\
\midrule
\O nsker ikke & & & \\
Ballbinge & & & \\
\midrule
& & & \\
\multirow{-2}*{Totalt}& & & \\
\bottomrule
\end{tabular}
\end{table}
\end{document}
LaTeX composes the table on a row-by-row basis. Additionally, colour is also printed before any of the cell contents in order to have it show up in the background. So, you need to "wait" until the second line and reposition the cell contents - in this case, move it up about half way between the two lines. For this, the \raisebox{<len>}{<stuff>}
is useful.
I've taken your MWE and moved up the appropriate cells' contents by 0.5\normalbaselineskip+\extrarowheight
, which puts it about half way between the two rows:
\documentclass{article}
\usepackage{booktabs}
\usepackage[dvipsnames*,svgnames]{xcolor}
\usepackage{colortbl}
\usepackage{array}
\begin{document}
\begin{table}
\centering
\setlength{\aboverulesep}{0pt}
\setlength{\belowrulesep}{0pt}
\setlength{\extrarowheight}{.75ex}
\begin{tabular}{|>{\columncolor{LightSteelBlue}}c| c | c | c|}
\toprule
\rowcolor{LightSteelBlue} & & & \\
\rowcolor{LightSteelBlue} & %
\raisebox{\dimexpr0.5\normalbaselineskip+\extrarowheight}{Mann} &
\raisebox{\dimexpr0.5\normalbaselineskip+\extrarowheight}{Kvinne} &
\raisebox{\dimexpr0.5\normalbaselineskip+\extrarowheight}{Totalt} \\ \midrule
\O nsker & & & \\
Ballbinge & & & \\ \midrule
\O nsker ikke & & & \\
Ballbinge & & & \\ \midrule
& & & \\
\raisebox{\dimexpr0.5\normalbaselineskip+\extrarowheight}{Totalt} & & & \\
\bottomrule
\end{tabular}
\end{table}
\end{document}