Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

css for displaying div tag

Tags:

html

css

I want to display three div tags b1,b2,b3 inside a container div tag asn box. I want to display the b1,b2,b3 div tag where I marked in green color.But now it displayed in position which i marked in red color.I already worked with similar concept.That code is not help for me .Now I just tried for one div b1.

.box{
  height:500px;
  border-style: solid;
  border-width: 2px;
  border-color: red;
}  
.b1{
  width:250px;
  height:175px;
  border-style: solid;
  border-width: 2px;
  border-color: #0000A0;
  margin:0;
  padding:10px 0px 0 50px;
  float:left; 
}
     <div class="box">
         <div class="b1">
         </div>  <!--end of emp div --> 
         <div class="b2">
         </div>  <!--end of cli div --> 
         <div class="b3">
         </div>  <!--end of doc div -->  
     </div> <!--end of box div -->

like image 910
user3386779 Avatar asked Mar 16 '23 22:03

user3386779


1 Answers

.wrap {
  height: 500px;
  border-style: solid;
  border-width: 2px;
  border-color: red;
  text-align: center;
}
.box {
  width: 25%;
  margin-top:5px;
  height: 175px;
  border-style: solid;
  border-width: 2px;
  border-color: #0000A0;
  padding: 10px 0px 0 50px;
  display: inline-block;

}
<div class="wrap">
  <div class="box b1">
  </div>
  <!--end of emp div -->
  <div class="box b2">
  </div>
  <!--end of cli div -->
  <div class="box b3">
  </div>
  <!--end of doc div -->
</div>
<!--end of box div -->

Output

like image 187
Aditya Raval Avatar answered Mar 27 '23 16:03

Aditya Raval