Consider the following answer given by @egreg which can be found at https://tex.stackexchange.com/a/111043/10898
Why is an extra 6.799999pt space created when you issue a command like
\framecolorbox[\textwidth]{blue}{blue!40}{what do I do here?}
Does it have to do with the frame separation? A simple way out is to issue a command like
\framecolorbox[\dimexpr\textwidth-6.799999pt\relax]{blue}{blue!40}{what do I do here?}
but this seems too trivial as an answer.

0.4ptand because the default value of thee separation between the edge of the framebox and the edge of the text (the parameteter\fboxsep) is3pt. Thus,0.4pt+3pt+3pt+0.4pt = 6.8pt. – Mico Aug 04 '14 at 03:47\fboxruleand\fboxsepapply for the "standard" LaTeX document classes, viz.,article,report, andbook. Some other document classes, no doubt, choose values other than0.4ptand3.0pt, respectively. Incidentally, the value of\fboxruleis usually the same as that ofarrayrulewidth-- the width of vertical and horizontal lines that occur inarrayandtabularenvironments. – Mico Aug 04 '14 at 03:56