# Extra vertical space after frame in document class {book} when a image not fit on the page [duplicate]

I create a two side document for a book. When I insert a image after some text and frame that not fit on the page, the text between frame and image starts in bottom of the page and created extra vertical space. But if I use for example the command \documentclass{report} this problem solved and the text starts immediately after frame no vertical space. How do I use the command ‎\documentclass[11pt,twoside]{book} does not create a vertical distance? This is the document:

 %‎‎‎\documentclass[11pt]{report}‎‎
‎\documentclass[11pt,twoside]{book} ‎
‎\usepackage[a4paper‎,
‎landscape‎,
‎textwidth=15cm‎,
‎right=3cm‎,
‎outermargin=7cm‎,
‎marginparwidth=5cm‎,
‎marginparsep=10pt]{geometry}
‎\usepackage{color}‎‎‎
‎\usepackage[framemethod=TikZ]{mdframed}‎
‎\usepackage{mdframed}‎
‎\usepackage{fancyhdr}‎

‎\usepackage{graphicx}
‎\usepackage{color}‎
‎\usepackage{tikzpagenodes}                     ‎ ‎‎
‎\newmdenv[skipabove=7pt‎,
‎skipbelow=7pt‎,
‎rightline=false‎,
‎leftline=true‎,
‎topline=false‎,
‎bottomline=true‎,
‎backgroundcolor=black!5‎,
‎linecolor=red‎,
‎innerleftmargin=5pt‎,
‎innerrightmargin=5pt‎,
‎innertopmargin=5pt‎,
‎leftmargin=0cm‎,
‎rightmargin=0cm‎,
‎roundcorner=0mm‎,
‎linewidth=2pt‎,
‎innerbottommargin=5pt]{dbox}‎
\begin{document}‎‎‎
some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text
\begin{dbox}
‏some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text
‎‏\end{dbox}‎‎‎‎
some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text
‎\begin{center}‎
\includegraphics[width=0.5\textwidth]{example-image}
‎\end{center}‎
\end{document}


## marked as duplicate by Johannes_B, Mensch, darthbith, barbara beeton, JesseDec 14 '15 at 14:31

• Put \raggedbottom in the preamble. book calss uses \flushbottom by default. – user11232 Apr 8 '15 at 6:23
• Just put \raggedbottom say, before \begin{document} like \raggedbottom\begin{document} – user11232 Apr 8 '15 at 6:39