0

Coding full-length image in HTML

I code on desktop using Adobe Brackets, and am currently experimenting with web design. I don’t pretend to be a web developer, but I know the basics. I’m copying some source code from w3schools.com, to create a full width section with an image background. However, that didn’t work, so I tried a colour background - same there. Does anyone have suggestions for how I could amend this? [I have a feeling it’s because I put the CSS separate, instead of in the <style> tag. Is that it?]

18th Apr 2020, 8:08 PM
Isaac Whitaker
Isaac Whitaker - avatar
3 odpowiedzi
+ 2
If you've basically just copied the code, it should work just fine. If the CSS is separate, you have to insert it in the head tag of the HTML page like this: <link rel="stylesheet" type="text/css" href="name of the stylesheet"> Another reason as to why your code is not working is probably just a typo error, i.e. maybe you misspelled something.
18th Apr 2020, 8:32 PM
Vasilis Karapas
Vasilis Karapas - avatar
+ 1
Vasilis Karapas Thank you SO much
19th Apr 2020, 7:20 AM
Isaac Whitaker
Isaac Whitaker - avatar
0
can you post you code on sololearn? plus if you just coy and paste there could be an error in the class or id names
18th Apr 2020, 11:55 PM
David Paredes
David Paredes - avatar