I have trouble arranging the floats on the pages. See for example the screenshot below:
Why is it happening like this? there is only this much text in this particular subsection, so why doesn't latex put the table behind the text and start the next subsection?

table is not restricted to any width.
\begin{table}
\caption{Effect of biofilm density on the drag and oscillation behavior. The
para\-meters used in the simulation are: $L/d=4.5$, $U_{0}=\SI{0.4}{\meter\per\second}$
($Re_{D}=133$).\label{tab:Effect-of-biofilm-density}}
\begin{tabular*}{0.8\textwidth}{@{\extracolsep{\fill}}cccc>{\centering}p{0.15\textwidth}}
\toprule
Density (\si{\kilogram\per\cubic\meter}) & $C_{D}$ (-) & Oscillation Frequency (\si{\hertz}) & Amplitude (\si{\micro\meter}) & Strouhal Number (-)\tabularnewline
\midrule
\num{950} & \num{1.2838} & 199.6 & 169 & 0.1662\tabularnewline
\num{1000} & \num{1.2913} & 199.0 & 181 & 0.1658\tabularnewline
\num{1100} & \num{1.2950} & 196.9 & 177 & 0.1639\tabularnewline
\num{1200} & \num{1.2988} & 195.2 & 182 & 0.1625\tabularnewline
\bottomrule
\end{tabular*}
\end{table}
Here is my preambles:
\usepackage{mathptmx}
\renewcommand*{\rmdefault}{ppl}
\renewcommand*{\sfdefault}{ppl}
\newcommand\hmmax{0} % default 3
%\usepackage{floatrow}
\usepackage{xcolor}
\definecolor{darkred}{rgb}{0.667,0.118,0.004}
\definecolor{codebg}{rgb}{0.95,0.95,0.95}
\definecolor{lgreen}{HTML}{b8b60b}
\usepackage[tocgraduated]{tocstyle}
\usetocstyle{nopagecolumn}
\usepackage{prettyref}
\newrefformat{eq}{Equation~\textup{(\ref{#1})}}
\newrefformat{chap}{Chapter~\ref{#1}}
\newrefformat{sec}{Section~\ref{#1}}
\newrefformat{sub}{Section~\ref{#1}}
\newrefformat{tab}{Table~\ref{#1}}
\newrefformat{fig}{Figure~\ref{#1}}
% schönerer Blocksatz!!
\usepackage{microtype}
\@ifpackageloaded{nomencl}{
\renewcommand{\nomname}{List of Notations}
\renewcommand*{\pagedeclaration}[1]{\unskip\dotfill\hyperpage{#1}}
}{}
%\setlength{\nomitemsep}{-\parsep}
%todo notes
\usepackage[colorinlistoftodos]{todonotes}
\newcommand{\todog}[1]{\todo[color=lgreen]{#1}}
\newcommand{\todor}[1]{\todo[color=red!40]{#1}}
\newcommand{\todob}[1]{\todo[color=blue!40]{#1}}
%/todo notes
\usepackage[]{titlesec}
\titleformat{\chapter}[display]{\scshape\small}{\filleft\rmfamily\fontsize{72pt}{10pt}\selectfont\textcolor{darkred}\thechapter}{1ex}{\rmfamily\Huge\itshape\filleft}[\vspace{2ex}]
\usepackage{booktabs}
%mass transfer paper
\usepackage{siunitx}
\sisetup{inter-unit-product={}\cdot{},number-unit-product = \;}
%end mass transfer paper
%show vectors in bold
\usepackage{bm}
\DeclareRobustCommand\vec[1]{%
\ifcat\noexpand#1\relax
\expandafter\bm
\else
\expandafter\mathbf
\fi{#1}}
%end renew commands
\usepackage[indention={.5cm},font={small,rm},format={plain},labelfont={rm,bf,up},textfont={rm,up}]{caption}
%-------center everything----------[
\usepackage{ifthen}
\renewenvironment{figure}[1][]{%
\ifthenelse{\equal{#1}{}}{%
\@float{figure}
}{%
\@float{figure}[#1]%
}%
\centering
}{%
\end@float
}
\renewenvironment{table}[1][]{%
\ifthenelse{\equal{#1}{}}{%
\@float{table}
}{%
\@float{table}[#1]%
}%
\centering
}{%
\end@float
}
%]----------centering-------------
\@ifpackageloaded{nomencl}{
\renewcommand{\nomname}{List of Symbols}
\renewcommand{\nomgroup}[1]{%
\ifthenelse{\equal{#1}{A}}{\item[\textbf{Roman Symbols}]}{%
\ifthenelse{\equal{#1}{G}}{\item[\textbf{Greek Symbols}]}{%
\ifthenelse{\equal{#1}{C}}{\item[\textbf{Abbreviations}]}{%
\ifthenelse{\equal{#1}{S}}{\item[\textbf{Subscripts}]}{%
\ifthenelse{\equal{#1}{T}}{\item[\textbf{Superscripts}]}{
\ifthenelse{\equal{#1}{Z}}{\item[\textbf{Mathematical Symbols}]}
{}
}% matches mathematical symbols
}% matches Subscripts
}% matches Superscripts
}% matches Abbreviations
}% matches Greek Symbols
}% matches Roman Symbols
}{}
% for correct jump positions whe clicking on a link to a float
%\usepackage[figure]{hypcap}
\definecolor{chaptercolor}{rgb}{.176,0,.367}
\addtokomafont{chapter}{\color{darkred}}
\addtokomafont{part}{\color{darkred}}
\addtokomafont{section}{\rmfamily\itshape}
\addtokomafont{subsection}{\rmfamily\itshape}
\addtokomafont{paragraph}{\normalfont\upshape\rmfamily\itshape}
\renewcommand*{\addparttocentry}[2]{%
\addcontentsline{toc}{part}{\partname\nobreakspace \protect\numberline{#1}#2}%
}
\usepackage{verbatim} % Mostly for the comment environment.
\newenvironment{mylisting}
{\begin{list}{}{\setlength{\leftmargin}{1em}}\item\scriptsize\bfseries}
{\end{list}}
\newenvironment{mytinylisting}
{\begin{list}{}{\setlength{\leftmargin}{1em}}\item\tiny\bfseries}
{\end{list}}
\usepackage{bigints}
\usepackage[font=small]{idxlayout}
%ornament
\usepackage{fourier-orns}
\newcommand*\myhrulefill{%
\leavevmode\leaders\hrule depth-2pt height 2.4pt\hfill\kern0pt}
\newcommand\niceending[1]{%
\begin{center}%
\LARGE -------------------- \hspace{0.2cm} #1 \hspace{0.2cm} --------------------%
\end{center}}
\newcommand*\nicesectionending{\niceending{\decofourright\decofourleft}}
\newcommand*\nicesubsectionending{\niceending{\aldinesmall}}
%/ornament
\usepackage{tikz}
\newenvironment{elaboration}{%
\par
\begin{tikzpicture}
\node[rectangle,minimum width=0.9\textwidth] (m)
\bgroup\begin{minipage}{0.85\textwidth}%
}{%
\end{minipage}\egroup;
\draw[dashed] (m.south west) rectangle (m.north east);
\end{tikzpicture}
}
\usepackage[section]{placeins}
\clubpenalty = 10000
\widowpenalty = 10000
and here is the minimal working example:
%% LyX 2.0.0 created this file. For more info, see http://www.lyx.org/.
%% Do not edit unless you really know what you are doing.
\documentclass[12pt,oneside,english,titlepage, a4paper, fontsize=12pt]{scrbook}
\usepackage{mathpazo}
\usepackage{helvet}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}
\usepackage[a4paper]{geometry}
\geometry{verbose,tmargin=2.5cm,bmargin=3.5cm,lmargin=2.5cm,rmargin=2.5cm}
\pagestyle{plain}
\setcounter{secnumdepth}{3}
\usepackage{color}
\usepackage{babel}
\usepackage{array}
\usepackage{booktabs}
\usepackage{setspace}
\onehalfspacing
\makeatletter
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LyX specific LaTeX commands.
%% Because html converters don't know tabularnewline
\providecommand{\tabularnewline}{\\}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.
\input{preambles/common.sty}
\usepackage{blindtext}
\makeatother
\begin{document}
\section{This is a title}
\blindtext
\begin{table}
\caption{Effect of biofilm density on the drag and oscillation behavior. The
para\-meters used in the simulation are: $L/d=4.5$, $U_{0}=\SI{0.4}{\meter\per\second}$
($Re_{D}=133$).\label{tab:Effect-of-biofilm-density-1}}
\begin{tabular*}{0.8\textwidth}{@{\extracolsep{\fill}}cccc>{\centering}p{0.15\textwidth}}
\toprule
Density (\si{\kilogram\per\cubic\meter}) & $C_{D}$ (-) & Oscillation Frequency (\si{\hertz}) & Amplitude (\si{\micro\meter}) & Strouhal Number (-)\tabularnewline
\midrule
\num{950} & \num{1.2838} & 199.6 & 169 & 0.1662\tabularnewline
\num{1000} & \num{1.2913} & 199.0 & 181 & 0.1658\tabularnewline
\num{1100} & \num{1.2950} & 196.9 & 177 & 0.1639\tabularnewline
\num{1200} & \num{1.2988} & 195.2 & 182 & 0.1625\tabularnewline
\bottomrule
\end{tabular*}
\end{table}
\section{This is another title}
\blindtext
\end{document}


\input{preambles/common.sty}and withsiunitx) puts the table at the to of the page. So it doesn't demonstrate the problem. – Ulrike Fischer Jul 29 '11 at 11:14