Firstly, My english is not good so if there is any mistake, please let me know.
I want to create a new environment in latex in order to make this frame
But when the text in frame is too long, there are some problems
Can you help me to solve my problems. Here is my code
\newcounter{vd}
\setcounter{vd}{0}
\newenvironment{vd}[1][]{
\def\ghichu{\textit{\color{blue}#1.}}
\addtocounter{vd}{1}
\noindent
\begin{tikzpicture}
\node[inner sep=10pt,fill=green!20] (vd)
\bgroup
\begin{minipage}{0.96\textwidth}
\textbf{\color{red}Ví dụ \thevd:}
}{
\flushright\ghichu
\end{minipage}
\egroup;
\draw[blue,line width=5pt] (vd.north west)--(vd.south west);
\end{tikzpicture}
}
Any help is appreciated

