html - How to place a circle inside a square box in css? -


i have webpage made in html , css in want put circle inside square box. here fiddle webpage.

at moment, able make square containing words in unable put circle inside square box. here pictorial representation of want.

the html , css codes using square boxes are:

<div class="rectangles">             <div class="rectangle">                  <p class="ceo">will's profile, ceo</p>                 <p class="ceo-words">say inspiring will</p>             </div>              <div class="rectangle">                  <p class="cfo">jacks profile, cfo</p>                 <p class="cfo-words">say inspiring jack</p>             </div>              <div class="rectangle">                  <p class="cto">zeeshan, cto</p>                 <p class="cto-words">say inspiring </p>             </div>              <div class="rectangle">                  <p class="future">whoever yall hire next</p>                 <p class="future-words">say inspiring </p>             </div>         </div> 

add new element , style css. way can include content , images inside it.

.rectangles .rectangle {      border-radius: 10px;      display: inline-block;      margin-bottom: 30px;      margin-right: 5px;      width: 350px;      height: 100px;      border: 1px solid #000;      background-color: white;      padding: 10px 10px 10px 100px;      position: relative;  }    .rectangles .rectangle .circle {    background: #aaa;    border-radius: 100%;    height: 60px;    width: 60px;    position: absolute;    top: 20px;    left: 20px;  }
<div class="rectangles">      <div class="rectangle">          <div class="circle"></div>          <p class="ceo">will's profile, ceo</p>          <p class="ceo-words">say inspiring will</p>      </div>        <div class="rectangle">          <div class="circle"></div>          <p class="cfo">jacks profile, cfo</p>          <p class="cfo-words">say inspiring jack</p>      </div>        <div class="rectangle">          <div class="circle"></div>          <p class="cto">zeeshan, cto</p>          <p class="cto-words">say inspiring </p>      </div>        <div class="rectangle">          <div class="circle"></div>          <p class="future">whoever yall hire next</p>          <p class="future-words">say inspiring </p>      </div>  </div>


Comments

Popular posts from this blog

python Tkinter Capturing keyboard events save as one single string -

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

javascript - Z-index in d3.js -