# How to add an macro below tcolorbox

How can I add an macro "Loi giai" which is bold and center below this tcolorbox and add contents after it (if needed).

\documentclass[12pt,a4paper]{article}
\usepackage[most]{tcolorbox}
\begin{tcolorbox}[colframe=blue,colback=white]
\end{tcolorbox}

\begin{document}
\begin{vd}%[2D1B1]
Đề bài
\loigiai{
lời giải
}
\end{vd}
\end{document}

• Please provide full your code. Jan 15 '20 at 4:01

## 1 Answer

You can make use of the before lower option and use \tcblower to create an upper and a lower part in your box. tcolorbox allows you to customise how the upper and lower boxes look, including the line between them (see §4.4 of the manual).

\documentclass{article}
\usepackage[utf8]{vietnam}
\usepackage{tcolorbox}

\newtcolorbox{qa}{%
colframe=blue, colback=white,
before lower=\begin{center}\textbf{\textcolor{blue}{lời giải}}\end{center}
}

\begin{document}
\begin{qa}
Đề bài
\tcblower
lời giải
\end{qa}
\end{document}