diff --git a/Libraries/LibWeb/Layout/BlockFormattingContext.cpp b/Libraries/LibWeb/Layout/BlockFormattingContext.cpp index 4be1d16ab2..48f64dbc94 100644 --- a/Libraries/LibWeb/Layout/BlockFormattingContext.cpp +++ b/Libraries/LibWeb/Layout/BlockFormattingContext.cpp @@ -235,7 +235,7 @@ void BlockFormattingContext::compute_width_for_floating_box(Box& box) if (margin_right.is_auto()) margin_right = zero_value; - auto width = style.width(); + auto width = style.width().resolved_or_auto(box, width_of_containing_block); // If 'width' is computed as 'auto', the used value is the "shrink-to-fit" width. if (width.is_auto()) {