Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Daniel Silva
5,353 PointsInvalid Property Value
I'm using bootstrap to style a web page I'm building.
On one of the pages, I have a jumbotron and a header that is inside it which I'm trying to display a background image. However, when I inspect the element I get an "Invalid property value" message. I know my path is right, just don't know what else it could be. I've also tried removing the header and using the jumbotron itself to display the image but I get the same error. Any help would be appreciated.
Thanks,
<!DOCTYPE html>
<body>
<?php include"Header/header.php";?>
<div class="wrap">
<div class="jumbotron">
<header class="adventure">
<p>This is what adventure looks like</p>
</header>
</div>
<div class="col-sm-12 main-video">
<video controls>
<source src="Videos/or-opening.mov" type="video/mp4">
</video>
<video controls>
<source src="Videos/losemyself.mov" type="video/mp4">
</video>
</div>
</div>
<?php include "Header/footer.php";?>
</body>
</html>
HERE IS THE CSS
.adventure {
text-align: center;
background: ("../Images/descend.jpg") no-repeat top center;
background-size: cover;
overflow: hidden;
padding-top: 60px;
}
1 Answer
Patrik Horváth
11,110 Pointsi m not sure but you have to add url to your path
background-image: url("../Images/descend.jpg");
if no works this will work 100%
background-image: url("../Images/descend.jpg")!important;
Daniel Silva
5,353 PointsDaniel Silva
5,353 PointsUrgh. I'm an idiot! It's the little things I forget. Thanks Patrik, it works now!
Patrik Horváth
11,110 PointsPatrik Horváth
11,110 Pointsits okey :) and you are not, we are humans we cant remember all and PS i always use Documentations :D and i m 100% sure every one use it too :)