I'm trying to align the main title so it starts after the counter box [red] and runs towards the right side of the box, but so far it stretches to the left. What am I doing wrong? Merci in advance for any help.
MWE:
\documentclass[11pt,a4paper]{article}
\usepackage[utf8]{inputenc}%erlaubt Umlaute
\usepackage{lmodern}
\usepackage[skins]{tcolorbox}
\newtcolorbox[auto counter, ]{mybox1}[3][]{
enhanced,
arc=.3mm,
boxrule=0.3pt,
fonttitle=\bfseries,
colback=white,
colframe=red!65!black,
enlarge top by=10mm,
subtitle style={ boxrule=0.2pt,
colback=blue!40!white},
overlay={%
\path[fill=blue!65,line width=.4mm] (frame.north west)--++(17mm,0)coordinate(n2)--++(0,8mm)--++(-20mm,0) arc (-90:90:-4mm)--cycle;
\node at ([shift={(5mm,4mm)}]frame.north west){\color{white}{
\textbf{\sffamily #2}}};
\path[fill=red!65!blue] ([xshift=.4mm]n2)--++(0,8mm)--++(7mm,0)--++(0,-8mm)--cycle;
\node at ([shift={(4mm,4mm)}]n2){\color{white}{\textbf{\sffamily \thetcbcounter}}};
\node at ([shift={(18mm,4mm)}]n2){
\itshape\textbf{\sffamily #3}};
},
#1
}
\newcounter{mycounter}
%----------------------------------------------------------------------------------------
%TCOLORBOXES
%----------------------------------------------------------------------------------------
\begin{document}
\begin{mybox1}[label=one]{sample}{Gebäudeheizlast nach DIN 12831 nach Temperatur}
This is a \textbf{tcolorbox}.\par
a lot of text here ... This is Example \ref{one}
\tcbsubtitle{\textbf{ Formeln}}
some text
\end{mybox1}
\end{document}
\node[anchor=west] at ([shift={(18mm,4mm)}]n2){\itshape\textbf{\sffamily #3}};
I think you'll have to reduce18mm
.