Bad practices of developers Part 1

I’m starting a series about bad practices that come across while working on various projects as a team.

This could happen even to experienced developers. An example from today:

<div>
….content here…..
</div>
<br/>
<br/>
<br/>
<br/>
<br/>
<div style=”text-align: left:margin-top:20px; margin-left:50px;margin-right: 50px”>
…….content here…….
</div>

This thing below is div that should be always at the bottom of the site. This document later is converted from html to PDF. The correct sollution in this case:

<div style=”text-align: left; padding-left:50px; padding-right: 50px; position: absolute; bottom: 10px;”>
</div>

The worst thing is that the upper part of the document is dynamic and sometimes some sections contain in one, two or three lines. The following provides a solution that div will always be at lower place.

This is why we have CSS.

Stay calm, keep your code good. Peace out. ;)