# How to change the border of mdframed?

I want to change the border color of the mdframe box. By default it take black.

\documentclass{article}
\usepackage{xcolor}
\usepackage{mdframed}
\newtheorem{mdtheorem}{Theorem}
\newenvironment{theorem}%
{\begin{mdframed}[backgroundcolor=lightgray]\begin{mdtheorem}}%
{\end{mdtheorem}\end{mdframed}}
\begin{document}
\begin{theorem}
Sample
\end{theorem}
\end{document}

1. My Default output is,

2. My Expected output is,

Any one suggest me the correct. I am new to LaTeX.

-

The correct way to define a new theorem environment with mdframed is through the \newmdtheoremenv command.

The option to change the color of the frame border is linecolor. If you also want to change the width of the border, use the option linewidth.

If you then want to show only the bottom of the border, set to false the options topline, rightline, and leftline.

Here is a MWE:

\documentclass{article}
\usepackage{xcolor}
\usepackage{mdframed}

\newmdtheoremenv[%
backgroundcolor=lightgray,
linecolor=red!60!black,
linewidth=2pt,
topline=false,
rightline=false,
leftline=false]{theorem}{Theorem}

\begin{document}
\begin{theorem}
Sample
\end{theorem}
\end{document}


Output:

-
I want to set the bottom line in that environment...@karlkoeller. – PSK Mar 6 '14 at 13:40
@PSK Oh, I see. Answer edited. – karlkoeller Mar 6 '14 at 13:44
Thank you so much...its working...@karlkoeller. – PSK Mar 6 '14 at 13:53