i am using bootstrap in WordPress. Header is not showing full width in WordPress. But when i test the code without WordPress it shows full width with background image. What can be the reason?

//my html

            <div class="container">
            <div class="row">
                <div class="col-xs-12">
                    <div class="header-container text-center background-image" style="background-image: url(<?php header_image(); ?>);">


//css settings
        display: block;
        position: relative;
        height: 326px;
        background-size: cover;
        background-position:  center center;
        background-repeat: no-repeat;

once you add width: 100%; in your header container css

  • Please edit your answer, and add an explanation: why could that solve the problem? – fuxia Sep 19 '17 at 7:30
  • added width:100%. but not working. – Ali Sep 19 '17 at 7:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.