Jump to content

Side By Side DIV


hackalive

Recommended Posts

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!

Link to comment
https://forums.phpfreaks.com/topic/238666-side-by-side-div/#findComment-1226475
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.