So I am using bootstrap css with my PHP website. For some reason I can get an img src to print just fine using the same location. But when i need to use background-image the images do not show. I cannot figure out why. Here is the section I am trying to get to show the standard bootstrap code.
//<!-- Wrapper for slides -->
echo '<div class="carousel-inner">';
echo '<div class="item active">';
echo '<div class="fill" style="background-image:url("http://placehold.it/1900x1080&text=Slide One");"></div>';
echo '<div class="carousel-caption">';
echo '<h2>Caption 1</h2>';
echo '</div>';
echo '</div>';
echo '<div class="item">';
echo '<div class="fill" style="background-image:url("http://placehold.it/1900x1080&text=Slide Two");"></div>';
echo '<div class="carousel-caption">';
echo '<h2>Caption 2</h2>';
echo '</div>';
echo '</div>';
echo '<div class="item">';
echo '<div class="fill" style="background-image:url("http://placehold.it/1900x1080&text=Slide Three");"></div>';
echo '<div class="carousel-caption">';
echo '<h2>Caption 3</h2>';
echo '</div>';
echo '</div>';
echo '</div>';
The fill css is this:
header.carousel .fill {
width: 100%;
height: 100%;
background-position: center;
background-size: cover;
}
When I put it in a normal html file it works fine. However, I am using php and autoloading, hence the need to use echo statements to print out the html parts. I don't know why this is not displaying the images. Any ideas?