+ 2
How can I add a pic to cover a <div> section? I know about href= I just don't know how to add it to cover the <div> section.
23 Respostas
+ 2
Ehhhh 😁 not that code. I sent you this one:
https://code.sololearn.com/WYIpX7bD2kxi/?ref=app
+ 3
Ok. Let me go practice and I'll get back to ya. Thanks!
+ 3
Ok now mine looks similar to yours but now I get nothing in output!
+ 3
I do. I got my content back but still no image!
+ 3
So...I'm trying to use a pic from Google drive. Is the url wrong? I getting so frustrated with this coding stuff!
+ 3
Sent
+ 2
<div style="background-image: url('your_url.png'); background-size: cover;"></div>
+ 2
Can I still add class="section"? Example...<div class="section" or does style="background-image: replace and have same effect?
+ 2
Sure You can add class to div and then style that class in css.
<style>
.section {
background-image: url('your_url.png');
background-size: cover;
}
</style>
<div class="section"></div>
+ 2
I added url but no pic shows. Also I'm not sure how to code the CSS page. Can you check it and give me guidance? I want to figure it out myself but I'm not above being given the answer out right lol.
+ 2
Make sure You added some content to div. Check this code out.
https://code.sololearn.com/WYIpX7bD2kxi/?ref=app
+ 2
Does the code look right now? Still no image though. I might have to change a setting in drive.
+ 2
That code works for me! Hmmm that is weird.
+ 2
Matus Semancik do you see a pic of a lake at sunset?
+ 2
What do you see when you open my code?
+ 2
Make sure you have some content in your <div>.
+ 2
Can you send me that url please?
+ 2
Finally got the basics done for this code. Thanks SO MUCH to Matus Semancik! I was so ready to give up on this coding thing. Even had a couple days where all I did was open the app to keep up my daily streak and check messages. I just took a moment today to do it again and decided to check a message that Matus had sent and what he sent me was almost the same as I had (with a couple of minor tweaks) and added those tweaks to my code and now my confidence has went back up...a little bit! Now I a little motivation to continue learning. I think I may have been putting too much time without little to no breaks learning and got a little burned out. The only reason I started working with this code again to begin with was to take a break from learning new stuff and to practice a little bit of what I have learned in html before I forgot it and because all of the stuff I have learned since I completed html certificate is mostly like reading something a crazy person has written. I think I will stick to practicing html..
+ 2
Coding and add to that slowly kinda like I did with this one. Except I will try not to just ask for the question to be answered like I did here. This was a tough challenge though because the link actually had to be altered! I would have never realized that the link had to be changed from what I copy/pasted, even if I had re-read everything 5-10 more times! Thanks again Matus! I might change this one to be a tribute to you instead of the axe-hole I had originally started it for!
https://code.sololearn.com/WysOf3UpwhEl/?ref=app
+ 1
Ok...so how should my HTML page look? Everything is bold now and still no img.