It is possible to have variants of \fbox, \frame etc. which only draw the frame rule on one or two specific sides, but I don't know any packages which provide such macros.
I took the standard LaTeX \fbox definition and added color support and an optional argument which can be used to select the sides with a frame: l left, b bottom, r right and t top. The line thickness can be changed using the \fboxrule length and the separation between the content and the frame using \fboxsep.
\documentclass{article}
\usepackage{xcolor}
\makeatletter
\newcommand\cfbox[3][lbrt]{%
\begingroup
\leavevmode
\setbox\@tempboxa\hbox{%
\color@begingroup
\kern\fboxsep{#3}\kern\fboxsep
\color@endgroup
}%
\@tempdima\fboxrule
\advance\@tempdima\fboxsep
\advance\@tempdima\dp\@tempboxa
\hbox{%
\hskip-.5\fboxrule
\lower\@tempdima\hbox{%
\vbox{%
\in@{t}{#1}%
\ifin@
{\color{#2}%
\hrule\@height\fboxrule
}%
\fi
\hbox{%
\in@{l}{#1}%
\ifin@
{\color{#2}%
\vrule\@width\fboxrule
}%
\fi
\vbox{%
\vskip\fboxsep
\box\@tempboxa
\vskip\fboxsep}%
\in@{r}{#1}%
\ifin@
{\color{#2}%
\vrule\@width\fboxrule
}%
\fi
}%
\in@{b}{#1}%
\ifin@
{\color{#2}%
\hrule\@height\fboxrule
}%
\fi
}%
}%
\hskip-.5\fboxrule
}%
\endgroup
}
\makeatother
\begin{document}
\cfbox[l]{red}{A}%
\cfbox[b]{red}{B}%
\cfbox[r]{red}{C}%
\cfbox[t]{red}{D}%
\bigskip
\setlength{\fboxsep}{.2ex}
\cfbox[b]{red}{AB}%
\cfbox[ltr]{red}{C}%
\cfbox[b]{red}{D}%
\end{document}

framenotborderwith LaTeX. It is possible to have variants of\fbox,\frameetc. which only draw the frame rule on one or two specific sides, but I don't know any packages which provide such macros. In general you shouldn't compare HTML/CSS and LaTeX, because both use different concepts. – Martin Scharrer May 12 '12 at 12:58mdframedpackage seem to have boolean attributestopline,bottomline,leftlineandrightline. These might do the job for you. (I trust the link to the page drawn with css was only to show a picture of what you want.) See http://ctan.math.utah.edu/ctan/tex-archive/macros/latex/contrib/mdframed/mdframed.pdf – Ethan Bolker May 12 '12 at 14:03mdframed. How to choose which sides of the border to draw in aframebox? – Ethan Bolker May 12 '12 at 14:28