I am trying to place text inside a square div. The only problem is that it shifts the div that text to a large extent. Does anyone know how I can return a div to its original position?
Here is the html:
<div id="squarecontainer"> <div id="square1"> <p>Easy to Manage</p> </div> <div id="square2"> </div> <div id="square3"> </div> </div>
Here is the css:
#squarecontainer{ text-align: center; } #square1{ display: inline-block; position: relative; margin-right: 100px; height: 310px; width: 310px; margin-top: 72px; background-color: #fff; } #square2{ display: inline-block; position: relative; height: 310px; width: 310px; margin-top: 72px; background-color: #fff; } #square3{ display: inline-block; position: relative; margin-left: 100px; height: 310px; width: 310px; margin-top: 72px; background-color: #fff; }
#square1 is a div that shifts very down when I added the text “Easy to Control”.
source share