I'm a beginner in the world of development, and I've been given a challenging task to tackle.
The assignment is to create a one-page website with navigation links for 'About Us' and 'Contact Us'. Upon clicking these links, the user's screen should smoothly scroll down to the corresponding sections on the page. I have successfully set this up.
However, here's where I need some assistance:
I want to use a background image that covers the full width and height of the user's screen, ensuring that the second section remains hidden even on larger screens.
This is how my elements are currently organized:
<div class="header">
<img class="logo" src="/logo.jpg">
<a href="#about" class="link">
<a href="#contact" class="link">
</div>
<div class="part1">
some content
</div>
<div class="part2 aboutus" id="about">
About us
</div>
<div class="part3 contactus" id="contact>
Contact us
</div>
Initially, Part 1 along with the header is visible to the user.
Question:
I'm looking for guidance on how to set a background image that only displays in Part 1 while covering the entire width and height of the user's screen, regardless of its size. I believe JQuery or specific CSS configurations are needed, but I'm unsure where to begin.
What steps can I take to achieve this?