hackalive Posted June 7, 2011 Share Posted June 7, 2011 Hi Guys, Like in FB chat, how can I make divs open side by sie, and others by the side of others etc? Cheers in advance. Quote Link to comment https://forums.phpfreaks.com/topic/238666-side-by-side-div/ Share on other sites More sharing options...
kenrbnsn Posted June 7, 2011 Share Posted June 7, 2011 This is more of an HTML or CSS question, not PHP. For HTML, use tables. For CSS use floats (left or right). Ken Quote Link to comment https://forums.phpfreaks.com/topic/238666-side-by-side-div/#findComment-1226474 Share on other sites More sharing options...
cssfreakie Posted June 7, 2011 Share Posted June 7, 2011 Well i don't use face book alot. But letting div's sit next to each other would require the float property. (as long as they fit in to the container that is holding them) the css would be: .myfloatingdiv{ float:left; width:200px; height:200px; border:2px solid red; margin:1px; } the html would be: <div class="myfloatingdiv">bla1</div> <div class="myfloatingdiv">bla2</div> <div class="myfloatingdiv">bla3</div> If you want to show the div's above all other things (on a higher level on the z-axis) you require a position absolute or relative or fixed, + a higher z-index. I recommend to just google for the keywords in bold text and after you read a bit about it, play with it and when you need help with actual code you wrote post it in the css forum. Hope this helps! Quote Link to comment https://forums.phpfreaks.com/topic/238666-side-by-side-div/#findComment-1226475 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.