Positioning the inner box in a nested tcolorbox

positioningtcolorbox

I would like to move the inner box below to the direction of the arrow as shown in the picture. Is it possible to arrange the position of the inner box with respect to the outer box?

enter image description here

\begin{tcolorbox}
  My outer box
  \begin{tcolorbox}
    My inner box
  \end{tcolorbox}
\end{tcolorbox}

Best Answer

\documentclass{article}
\usepackage[most]{tcolorbox}

\begin{document}

\begin{tcolorbox}
  My outer box
  \begin{tcolorbox}
    My inner box
  \end{tcolorbox}
\end{tcolorbox}

\begin{tcolorbox}[left=1mm, right=1mm]
  My outer box
  \begin{tcolorbox}
    My inner box
  \end{tcolorbox}
\end{tcolorbox}

\begin{tcolorbox}
  My outer box
  \begin{tcolorbox}[enlarge left by=-4mm, enlarge right by=-4mm, width=\linewidth+8mm]
    My inner box
  \end{tcolorbox}
\end{tcolorbox}

\end{document}

enter image description here