A scaling law for the osmotic pressure ( \(\Pi\) ) for dense, quasi-two-dimensional (Q2D) polymer melts without solvent as a function of the monomer concentration ( \(c\) ) has been introduced. The scaling law, \(\Pi \left(c\right)\sim {c}^{{d}_{f}/\left({d}_{f}-1\right)}\) , predicts continuous transitions between fractal dimensions ( \({d}_{f}\) ) as \(c\) increases. To achieve Q2D conditions, the polymer melt is confined by surfaces. Here, a new and simple method is provided to include the physical properties of the confining surfaces, such as their stiffness, into the model, which is solved using numerical simulations. The structural properties of the Q2D polymers melts, such as their contour length and inner monomer pair distribution functions reveal that the fractal dimension increases monotonically from \({d}_{f}=5/4\) , all the way up to \({d}_{f}=2\) . The fractal scaling law is assessed in Q2D polymer melts with polymerization degrees equal to \(N=1000\) and \(N=4000\) . Our results show that the osmotic pressure of Q2D polymer melts follows the proposed fractal scaling law, regardless of the choice of polymer/wall interaction, and help interpret experiments and design new low dimensional materials.