I made a box float using the following:
\usepackage{float}
\newfloat{Box}{t}{bx}[chapter]
and
\begin{Box}[htp]
\label{box:test}
\fcolorbox{black}{boxgray}{\parbox[c]{\textwidth}{The text goes here}}
\end{Box}
I would like to have the label, i.e. 'Box 1' appear inside the box in the first row of text. Does anyone have an idea of how to implement this?
A basic version of the file I am using:
\documentclass[11pt]{article}
\usepackage{color}
\definecolor{boxgray}{RGB}{215,215,215}
\usepackage{hyperref}
\usepackage{float}
\newfloat{Box}{t}{bx}[section]
\begin{document}
\section{example}
Something about \ref{box:test}.
\begin{Box}[htp]
\label{box:test}
\fcolorbox{black}{boxgray}{\parbox[c]{\textwidth}{The text goes here}}
\end{Box}
\end{document}
\documentclass{...}
and ending with\end{document}
.