# Css overlaping divs!

**URL:** <https://forum.kirupa.com/t/css-overlaping-divs/182846>\
**Category:** Uncategorized\
**Created:** [March 21, 2006, 10:13pm UTC](https://forum.kirupa.com/t/css-overlaping-divs/182846 "2006-03-21T22:13:54Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![aBnest](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/abnest/32/2177_2.png) [@aBnest](https://forum.kirupa.com/u/aBnest)\
**Post date:** [March 21, 2006, 10:13pm UTC](https://forum.kirupa.com/t/css-overlaping-divs/182846/1 "2006-03-21T22:13:54Z")

</div>

Hi…  
i’m just starting put with css and stumbled upon a problem:

i have 2 divs on my main page, one that is set to float right, and the other is fixed to the left of the screed, and has a defined width. the problem is that if i resize my browser too much, the div that floats to the righ just overlaps with the other div. what i want to do is that if you resize the browser until the 2 divs meet, the floated one does’t overlap, but it stops right near the edge of the other one.  
can anyone help me with this?

thanks

---

<div class="post-metadata">

**Author:** ![DDD](https://avatars.discourse-cdn.com/v4/letter/d/9fc348/32.png) [@DDD](https://forum.kirupa.com/u/DDD)\
**Post date:** [March 21, 2006, 10:18pm UTC](https://forum.kirupa.com/t/css-overlaping-divs/182846/2 "2006-03-21T22:18:08Z")

</div>

give the one to the right a margin-left equal to the width of the div on the left. That way you dont have to float
