Sanırım bu işini görecektir

kaynak

<!DOCTYPE html>
<html>
<head>
<style>
img {
  float: left;
}
</style>
</head>
<body>
<h1>Change clear with JavaScript</h1>

<button onclick="myFunction()">Try it</button>

<p>Click the "Try it" button to set the clear property of the DIV element to "both".</p>

<img src="smiley.gif" width="32" height="32">
<div id="myDIV">This is some text.<br>This is some text.<br>This is some text.<br>This is some text.</div>

<script>
function myFunction() {
  document.getElementById("myDIV").style.clear = "both";
}
</script>


</body>
</html>