+ 2
Responsive Layout with Bootstrap
You're building a webpage layout using Bootstrap. Which class should you use to make a container stretch across the full width of the viewport and adapt responsively to screen size? Options: A) .responsive B) .container-fluid C) .auto-fit D) .grid
3 Respostas
+ 2
instead of answering your question, here is a link. The answer in is there. It's also a good Bootstrap learning resource.
https://getbootstrap.com/docs/5.0/layout/containers/
+ 1
B) .container-fluid.
In Bootstrap, the .container-fluid class is used to create a container that spans the entire width of the viewport and adapts responsively to different screen sizes. Unlike .container, which has a fixed max-width at different breakpoints, .container-fluid ensures full width at all times.
+ 1
<div class="container-fluid">
<h1>Full-Width Container</h1>
<p>This container stretches across the entire width of the viewport.</p>
</div>