<!doctype html>
<head>
<style>
.box { padding:3px; margin:3px }
.nowrap { white-space: nowrap; }
.float { float: left; }
.box div { height:40px; border:2px solid black; background-color:red }
.float { width:100px; height:100px; background-color:yellow }
.shift { margin-top:-48px; height:40px; background-color:orange; margin-right:8px }
</style>
<body>

<div class="float"></div>

<div class="box"><a><div>This line of text should avoid the float and paint on top of the orange background. The black border should paint behind the float.</div></a></div>
<div class="shift"></div>