TheLearner
TheLearner

Reputation: 2863

Mysterious horizontal scrollbar in Edge/IE

I have a page that displays a grid of images each with some text as overlay over at http://www.peppy-burro.com/blog/. The page looks great on all browsers except IE/Edge where horizontal scrollbar appears even though there's nothing to display when the page is scrolled to the right. The problem seems to be coming from the overlay text. Here's a snippet of the markup in question:

<trackitem class="tracklistview col-lg-3 col-md-6 col-sm-6 col-xs-6">
            <div class="trackinner">
                <div class="trackthumb">
                    <img class="img-fluid post-thumbnail" src="/blog/wp-content/uploads/2016/09/spanish-verbal-phrases-featured-1.jpg">
                    <div class="post-overlay">
                        <div class="post-overlay-text">
                            <timetoread><i class="fa fa-clock-o"></i>  24 minutes to read</timetoread>                            <h2><a href="/blog/spanish-verbal-phrases-infinitive/" itemprop="name">31 Bare Essential Spanish Verbal Phrases Using the Infinitive</a></h2>
                            <p>Your Ultimate Guide to Some of the Most Ubiquitous Verbal Phrases in Spanish II</p>
                        </div>
                    </div>
                </div>
                <p class="post-info">
                    <i class="post-icon post-date-icon fa fa-calendar"></i>
                    <a href="/blog/2016/9">September</a> <a href="/blog/2016/9/20">20</a>, <a href="/blog/2016">2016</a>                    <span class="separator"></span>
                    <span class="tagspan"><span class="tagstart"><i class="post-icon post-author-icon fa fa-user"></i><a href="/blog/author/amitschandillia/">Amit Schandillia</a></span></span>
                    <span class="separator"></span> 
                    <!-- tags -->
                    <span class="tagspan"><span class="tagstart"><i class="post-icon post-tags-icon fa fa-tags"></i><a href="/blog/tag/grammar/">Grammar</a></span></span>
                </p>
            </div>
        </trackitem>

The style that governs the overlay is:

.post-overlay-text {
    padding-left: .3em;
    padding-right: .3em;
    position: absolute;
    z-index: 2;
    top: 50%;
    left: 50%;
    -webkit-transform: translate(-50%,-50%);
    -moz-transform: translate(-50%,-50%);
    -ms-transform: translate(-50%,-50%);
    -o-transform: translate(-50%,-50%);
    transform: translate(-50%,-50%);
    width: 100%;
    text-align: center;
}

I have used absolute positioning to center the text horizontally and vertically across the underlying image. The horizontal scrollbar seems to be coming from the following style:

left: 50%;

Is there any way to prevent the scrollbar while also maintaining the overlay text's position?

Upvotes: 0

Views: 2469

Answers (1)

Serge In&#225;cio
Serge In&#225;cio

Reputation: 1382

Try to add: overflow: hidden;

Regards

Upvotes: 2

Related Questions