Skip to content

Instantly share code, notes, and snippets.

@dev4design
Last active May 8, 2022 07:45
Show Gist options
  • Save dev4design/2b791d1d32c77029eabc402f72857ec1 to your computer and use it in GitHub Desktop.
Save dev4design/2b791d1d32c77029eabc402f72857ec1 to your computer and use it in GitHub Desktop.
<style>
.container:after {
content: '';
clear: both;
}
img { float: left }
</style>
<div class="container">
<img src=".." alt="float element" />
<p>blah blah blah...</p>
</div>
<style>
img { float: left }
.null {
display: block;
clear: both
}
</style>
<div class="container">
<img src=".." alt="float element" />
<p>blah blah blah...</p>
<span class="null"></span>
</div>
<style>
.dv1 { float: left }
.dv2 { float: right }
</style>
<div class="dv1">dv1</div>
<div class="dv2">dv2</div>
<p>floating blah blah blah...</p>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment