How can I make the gray part as tall as the title box (the red part)? I tried changing bottom
and middle
, but middle
changes the space between the text and the lower box (which I don't want), and even if it didn't I'd still be eyeballing all the measures.
\documentclass{article}
\usepackage[many]{tcolorbox}
\usepackage{lipsum}
\newlength{\cornerwidth}
\setlength{\cornerwidth}{.5mm}
% --------------------------
\begin{document}
\tcbset{title={1 January 2001},
center title,
halign lower=center,
boxrule=\cornerwidth,
sharp corners,
bicolor,
collower=black,
colback=white,
colframe=black!75,
colbacklower=black!40,
colbacktitle=red,
coltitle=black}
\begin{tcolorbox}[overlay={\draw[tcbcolframe, line width=\cornerwidth] (segmentation.west)--(segmentation.east);}]
\lipsum[1]
\tcblower
89.50
\end{tcolorbox}
\end{document}
tcbsubtitle
(which shares geometry withtitle
) instead of alower
part. But I don't know how to avoid the empty line after that. If you find how to do it, I think you'll have a good solution for your problem.tcbsubtitlte
was my first solution but I changed idea for two reasons: 1) I can't find a way to extend the borderlines to makethe connectionwith the vertical ones seamless this is what I mean 2) the empty line can technically beremoved withafter={\vspace{-<some>pt}}
in thetcbsubtitle
options, butI didn't like that solution as I couldn't get the exact amount of space to subtract(basically the height of the white line plus the one of the border).tcbsubtitle
(which I just found out) is that it shares the geometry with title only in the “default“ case: for example, if I make the title\Huge
, the title box will adjust but the subtitle one won't.title
andtcbsubtitle
using the same parameter.