I have set up my slider like they show on a previous topic here with three wrappers to center my caption vertically and horizontally. Although the table div is not 100% wide on all screen resolutions.
When I resize my screen it sort of jump between being 100% wide and (100% -1px) wide. Why is that and is there anything I can do to prevent it?
Editable JSFiddle / Fullscreen JSFiddle
.caption {
position: absolute;
height: 100%;
top:0;
display: block;
width: 100%;
z-index: 100;
}
.caption-inner {
display:table;
text-align: center;
height: 100%;
width: 100%;
}
.caption-inner-cell {
display: table-cell;
text-align: center;
background-color: rgba(0,0,0,.0);
vertical-align: middle;
}
.caption-text {
z-index: 0;
position:relative;
display:block;
padding: 35px 0;
margin:0;
font-size: 28px;
font-weight: bold;
background: url(img/extra/transparent-22-percent.png);
background-repeat: repeat;
}
with the html:
<div class="caption">
<div class="caption-inner">
<div class="caption-inner-cell">
<span class="caption-text">
<h2 class="caption-title pink-text">
<?php the_title(); ?>
</h2>
<div class="caption-sub-title">
<?php the_content(); ?>
</div>
</span>
</div>
</div>
</div>
I use Google Chrome but I've also seen the problem on Ipad Safari