Loading

Quipoin Menu

Learn • Practice • Grow

css / Fixed and Sticky nav bar
mcq
Direction: Choose the correct option

Q1.

.fixed-nav {
position: fixed;
top: 0;
width: 100%;
}
How does this navigation bar behave?
A. Appears after scrolling
B. Hidden initially
C. Stays at top while scrolling
D. Scrolls with page
Direction: Choose the correct option

Q2.

body {
margin-top: 60px;
}
Why is this added when using a fixed navbar?
A. For styling
B. To add space
C. To prevent content from hiding under navbar
D. For mobile view
Direction: Choose the correct option

Q3.

.sticky-nav {
position: sticky;
top: 0;
}
How is sticky different from fixed?
A. Sticky scrolls until threshold then sticks
B. Sticky only works on mobile
C. Fixed always sticks
D. Both same
Direction: Choose the correct option

Q4.

What is a common use case for sticky positioning?
A. Footers
B. Section headers in long content
C. Modals
D. Top navigation bars
Direction: Choose the correct option

Q5.

.sidebar {
position: sticky;
top: 20px;
}
When does this sidebar start sticking?
A. After 20px of content
B. After scrolling 20px from top
C. Immediately
D. At 20px from bottom