So I have this code where my first table keeps going to the second page and I actually want it to stay on the first page since there is enough space for it and the gap looks weird. Any idea how to fix this and why it keeps jumping down even though there should be enough space for it on the front page? Code:
\documentclass[12pt, fullpage, oneside]{article}
\usepackage[utf8]{inputenc}
\addtolength{\oddsidemargin}{-.875in}
\addtolength{\evensidemargin}{-.875in}
\addtolength{\textwidth}{1.75in}
\addtolength{\topmargin}{-1.7in}
\addtolength{\textheight}{3in}
\title{Assignment 1}
\author{Anonymous)}
\date{September 2021}
\begin{document}
\maketitle
\section{Goal definition}
\subsection*{Assignment A}
The purpose of the LCA is to identify any hot spots or flaws in the manufacturing stage and/or use stage of a vacuum cleaner made by large Danish manufacturer company of electric products. The intended use of the LCA is therefore to improve new vacuum cleaners. One intended user of the LCA is therefore the department that develop the product and they can then use the LCA to improve their product.
\subsection*{Assignment B}
As clarified in the first assignment the LCA was made so that changes and improvements could be made. A vacuum cleaner is a fairly small product with a very specific use so the change in its manufacturing processes and thereby environmental impact is not going to have big consequences on a large scale. Therefore the decision context must be situation A "Micro level decision support".
\begin{table}\def\arraystretch{1.5}
\section{Scope definition}\subsection{Assignment C}\subsubsection{Chest freezer}
\begin{tabular}{|c|c|}
\hline\textbf{Obligatory properties}&\textbf{Positioning properties}\ \hline
Function as a container for food & Has light when lid is opened \ \hline
Be able to freeze food & Electronic display showing temperature and more \ \hline
Keep same temperature & Classical music when opened\ \hline
Seal tight = No leaking & Wheels\ \hline
Can be opened & Cheap\ \hline
Not affect the temperature around it & Efficient \ \hline
\end{tabular}
\caption{This table shows the obligatory properties and positioning properties of a chest freezer}
\end{table}
\begin{table}
\subsubsection*{Packaging of beer bottles}
\centering
\def\arraystretch{1.5}
\begin{tabular}{|c|c|}
\hline
\textbf{Obligatory properties}&\textbf{Positioning properties}\ \hline
Container for beer & Ergonomic handles for comfortable lifting \ \hline
Segments for each bottle so they do not tilt & Wheels \ \hline
Handles & Recyclable\ \hline
Sturdy material & Green colour\ \hline
\end{tabular}
\caption{This table shows the obligatory properties and positioning properties of a packaging of beer bottles}
\end{table}
\end{document}

\sectionand\subsectioncommands inside of a floating environment such as thetableenvironments? For some background information on how to influence float positions, take a look at: How to influence the position of float environments like figure and table in LaTeX?. Using the optional argument of thetableenvironment, for example as in\begin{table}[htbp]should result in an output closer to the expected one. – leandriis Sep 07 '21 at 17:15