Skip to content

Commit

Permalink
fix(learn/css): update replaced elements in grid layout description (#…
Browse files Browse the repository at this point in the history
…34317)

* fix(learn/css): update replaced elements in grid layout description

* Update files/en-us/learn/css/building_blocks/images_media_form_elements/index.md

---------

Co-authored-by: Estelle Weyl <[email protected]>
  • Loading branch information
OnkarRuikar and estelle committed Jun 24, 2024
1 parent 6f89249 commit fce408d
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ You could also try the value of `fill`, which will fill the box but not maintain

## Replaced elements in layout

When using various CSS layout techniques on replaced elements, you may well find that they behave slightly differently from other elements. For example, in a flex or grid layout, elements are stretched by default to fill the entire area. Images will not stretch, and instead will be aligned to the start of the grid area or flex container.
When using various CSS layout techniques on replaced elements, you may well find that they behave slightly differently from other elements. For example, in a grid layout, elements are stretched by default to fill their entire [grid areas](/en-US/docs/Glossary/Grid_Areas). Images do not stretch; instead, they are aligned to the start of their grid areas.

You can see this happening in the example below where we have a two column, two row grid container, which has four items in it. All of the `<div>` elements have a background color and stretch to fill the row and column. The image, however, does not stretch.

Expand Down

0 comments on commit fce408d

Please sign in to comment.