I want to center exactCenter
div to the exact center of the page. I'm using bootstrap. I tried as below but due to the dynamic width (I need the width to be dynamic), I do not know how to center it to the exact center of the page?
I created a Fiddle
<div class="wrapper row">
<div class="col-xs-12 col-sm-6 col-md-4 exactCenter">Test</div>
</div>
css:
.wrapper{
width: 100%;
height: 100%;
position: fixed;
}
.exactCenter {
position: fixed;
background-color: #00FF00;
top: 50%;
left: 50%;
text-align: center;
/*margin-top: -15%;
margin-left: -30%; */
}
Edit:
I want to avoid transform: translate(-50%, -50%);
- sometimes text are blurry.
All answers I googled had a fixed width and height (inner div). But in my case the width and height is dynamic.