javascript - seperate div to 3 colums -


i asked same question 2 days ago still don't it.
have 1 div , want separate 3 columns of div. know how 2 column but, when trying 3 column(right, center , left) this:

enter image description here

problem: pink square not in center

here code:

html:

 <div id="our_services" class="container">     <h1>המוצרים שלנו</h1>     <div id="try">         <div id="product1">         </div>         <div id="product2">         </div>         <div id="product3">         </div>     </div> </div> 

css:

#our_services {     /*height: 450px;*/     text-align: center;     font-family: "open_sans_hebrewregular", "alefregular",arial,"times new roman";     color: black;     background-color: rgb(224,224,224);     overflow: auto;     margin: auto; }  #try {     background-color: orange;     width: 50%;     height: 50%;     margin: auto; }  #product1 {     width: 30%;     height: 75%;     background-color: green;     float: right;     margin: 5px; }  #product2 {     width: 30%;     height: 75%;     background-color: pink;     float: right;     margin: 5px; }  #product3 {     width: 30%;     height: 75%;     background-color: blue;     float: left;     margin: 5px; } 

try display:inline-block; instead. exemple


Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -