Positioning of upper part in tcolorbox

tcolorbox

I have some trouble with the package tcolorbox. I want the pie chart icon to be larger, appear at the beginning of the box and be horizontally centered instead of vertically centered. In my MWE the icon is too small, vertically centered and does not appear horizontally centered:

picture

\documentclass[12pt]{article}
\usepackage[most]{tcolorbox}
\usepackage{fontawesome}
\usepackage{lipsum}

\begin{document}

\tcbsidebyside[title=The Triangle,
sidebyside adapt=left,
colback=blue!5!white,
colframe=blue!50!black,
fonttitle=\bfseries,
lower separated=false,
drop lifted shadow,
]{%
    \Huge\textcolor{blue!50!black}{\faPieChart}
}{%
    \lipsum[1]
}

\end{document}

Best Answer

To vertically align both sides you have to fix a sidebyside align option. About the pie not being centered. It is centered into left box, but as you hide the separation, it looks like missplaced.

\documentclass[12pt]{article}
\usepackage[most]{tcolorbox}
\usepackage{fontawesome}
\usepackage{lipsum}

\begin{document}

\tcbsidebyside[title=The Triangle,
sidebyside adapt=left,
colback=blue!5!white,
colframe=blue!50!black,
fonttitle=\bfseries,
%lower separated=false,
drop lifted shadow,
sidebyside align=top seam,
]{%
    \Huge\textcolor{blue!50!black}{\faPieChart}
}{%
    \lipsum[1]
}

\end{document}

enter image description here

As I don't know how to change the separation between text and frame in side by side boxes, I propose to use an alternative construction. It's a simple tcolorbox with a large left separation and the pie added as an overlay. This way you can control its position.

\documentclass[12pt]{article}
\usepackage[most]{tcolorbox}
\usepackage{fontawesome}
\usepackage{lipsum}

\begin{document}


\begin{tcolorbox}[enhanced, title=The Triangle,
colback=blue!5!white, colframe=blue!50!black, 
fonttitle=\bfseries, drop lifted shadow,
left=20mm, overlay={%
\node[anchor=north,text=blue!50!black, font=\Huge, inner sep=2mm] 
at ([xshift=10.5mm]interior.north west) {\faPieChart};} ]
\lipsum[1]
\end{tcolorbox}
\end{document}

enter image description here