Lesson 3. How to make a website problems


#1

I make the rule for the jumbotron <div class="jumbotron">..</div> then I put it in index.html I then put

.jumbotron { 
   background-image: url('https://goo.gl/04j7Nn'); 
   height:500px; 
}

#2

Not enough information. What is your question? Are you getting an error message?


#3

So I made the rule and put it index.html then I put the code for the background image and the height in main.css but it still doesn't work when I submit it. it says I need to Set the height of the Set the height of the div class="jumbotron">.. to 500px. I have my height set to 500px and it still doesn't work. PS I also know I did the code wrong I just did it like that so it showed up.


#4

You have presented the code correctly in your opening post. Very good of you to take the time to learn how to post code, both block code samples, and inline phrases. Thank you for that.

Whenever there are pixel units, we must be sure that the screen zoom for our browser is set to exactly 100%. I don't know that that is your problem, but it is a recurring one.

One other possibility is that the author is checking for properties in the order given in the instructions. First the height, then the background-image. It's reaching, I know...

.jumbotron {
    height: 500px;
    background-image: url('http://goo.gl/04j7Nn');
}

Is your HTML correct, up to this point?


#5

My zoom is at 100% also what I don't understand is why its telling me to set the height to 500px yet it is already at 500px's


#6

I found out what went wrong I forgot to close off the section on the other CSS code I wrote


#7

Good you found the culprit. It's not uncommon to see an error message that does not match up to the actual error. In time we get pretty good at sussing out what a message indicates. CSS does not have a compiler to kick out errors. It just ignores the rules that contain errors. Without the SCT messages, we are on our own to find mistakes.