<div class="container mx-auto px-4"> <section class="???"> Full-bleed content </section> </div>
Option A uses relative positioning and moves the section 50% to the right with left-1/2, then shifts it back left by 50% of its own width with -translate-x-1/2. This centers the section relative to the viewport, ignoring the container's max width and padding. The w-screen makes it span the full viewport width. Padding px-4 adds horizontal spacing inside the section.
Other options either don't correctly center or don't stretch full width.
<div class="outer-container px-8"> <div class="inner-container max-w-4xl mx-auto px-4"> <section class="full-bleed">Content</section> </div> </div>
The full-bleed section is a direct child of .inner-container. So the selector .inner-container > .full-bleed targets it specifically.
Option C fails because .full-bleed is not a direct child of .outer-container. Option C selects any descendant, which is less specific. Option C selects all elements with class full-bleed, which might be too broad.
-mx-4) on a full-bleed section inside a padded container?Containers often have horizontal padding to keep content away from edges. Negative margins on the full-bleed section cancel that padding, allowing the section to stretch fully from edge to edge of the viewport.
Options A, C, and D misunderstand the effect of negative margins.
w-full versus w-screen on a full-bleed section inside a centered container with padding?full and screen mean in Tailwind width utilities.w-full sets width to 100% of the parent container, so inside a centered container with max width and padding, it stays limited to that container's width.
w-screen sets width to 100% of the viewport width, ignoring container limits, making the section truly full-bleed.
Using semantic elements like <section> helps screen readers understand the page layout. Adding ARIA labels can clarify the section's purpose if needed.
Option A makes the section focusable but is unnecessary unless interactive. Option A loses semantic meaning. Option A harms readability and accessibility by removing padding.