# tcolorbox / out of the box

I would like to understand why the text go out of the box in the "Résutats & Intégrations" According to the documentation of tcolorbox package section 4.7.4, the text should be just in the box with no padding by using :

boxsep=0pt , top=0pt, bottom=0pt


so, I don't understand.

\documentclass[12pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[frenchb]{babel}
\usepackage[table,x11names]{xcolor}
\usepackage{tcolorbox}
\tcbuselibrary{skins}
\usepackage{titletoc}
\usepackage{titlesec}
\usepackage{multicol}
\usepackage[paper=a4paper, margin={1cm,3cm},
%
\titleformat
{\section} % command
[display] % shape
{\bfseries\Huge} % format
{} % label
{0pt} % sep
{
\begin{tcolorbox}[enhanced,colframe=white, colback=DeepSkyBlue1!80,
valign=center, nobeforeafter, halign=center,
boxsep=0pt , top=0pt, bottom=0pt
]
} % before-code
[
\end{tcolorbox}
] % after-code

\begin{document}
\noindent
\setlength{\columnseprule}{.5pt}
\setlength{\columnsep}{1cm}
\begin{multicols}{2}
\section{Résultats \& Intégrations}
\end{multicols}
\end{document}


It seems that you misunderstood the manual ... You need to add top distance (as follows from figures on very begining of manual. With

\documentclass[12pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[frenchb]{babel}
\usepackage[table,x11names]{xcolor}
\usepackage{tcolorbox}
\tcbuselibrary{skins}
\usepackage{titletoc}
\usepackage{titlesec}
\usepackage{multicol}
\usepackage[paper=a4paper, margin={1cm,3cm},
%
\titleformat
{\section} % command
[display] % shape
{\bfseries\Huge} % format
{} % label
{0pt} % sep
{
\begin{tcolorbox}[enhanced,colframe=white, colback=DeepSkyBlue1!80,
valign=center, nobeforeafter, halign=center,
boxsep=0pt , top=0.5ex, bottom=0pt
]
} % before-code
[
\end{tcolorbox}
] % after-code

\begin{document}
\noindent
\setlength{\columnseprule}{.5pt}
\setlength{\columnsep}{1cm}
\begin{multicols}{2}
\section{Résultats \& Intégrations}
\end{multicols}
\end{document}


I got

• Could you tell me where I could find the point " need to add top distance" in the tcolorbox documentation. I didn't succeeded to find it – flav Apr 3 '16 at 6:09
• See "quick reference", page 10, the second image. There are shown and named all distances and lines (borders) regarding tcolorboxes. From both pictures there you can see, how all boxes, provided by package,are designed. – Zarko Apr 3 '16 at 6:17