How am I suppose to put two <div> next to each other?
You need to set the div's dimensions and use 'float' property :)
Floating elements is an alternative way of positioning. No need to use relative nor absolute positioning with it. But, if you use fixed widths for both floated elements and their container, you have to make sure their total width + margins do not ecxeed the container's width. You can also use 'flex' positioning but only modern browsers support it.
Hmm weird, do you use position:relative? Maybe that's reason of overlapping
It has to be relative! found it in stackoverflow yesterday. this stuffs are really confusing 😄 tnx Three G
use float: left ; in css for first div
I think in CSS: display:inline-block
tnx, but float makes them overlap 😭
yeah ZinC. I needed another div container to achieve my expected result. the link blow has a solution http://stackoverflow.com/questions/446060/css-two-divs-next-to-each-other thanks guys