From 4b1a9203c547c019fc5398082ae19a3f3d4c3efe Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:41:15 -0500 Subject: initial commit --- files/ar/glossary/grid_areas/index.html | 78 +++++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 files/ar/glossary/grid_areas/index.html (limited to 'files/ar/glossary/grid_areas') diff --git a/files/ar/glossary/grid_areas/index.html b/files/ar/glossary/grid_areas/index.html new file mode 100644 index 0000000000..5e89defe39 --- /dev/null +++ b/files/ar/glossary/grid_areas/index.html @@ -0,0 +1,78 @@ +--- +title: Grid Areas +slug: Glossary/Grid_Areas +translation_of: Glossary/Grid_Areas +--- +

A grid area is one or more {{glossary("grid cell", "grid cells")}} that make up a rectangular area on the grid. Grid areas are created when you place an item using line-based placement or when defining areas using named grid areas.

+ +

Image showing a highlighted grid area

+ +

Grid areas must be rectangular in nature; it is not possible to create, for example, a T- or L-shaped grid area.

+ +

In the example below I have a grid container with two grid items. I have named these with the {{cssxref("grid-area")}} property and then laid them out on the grid using {{cssxref("grid-template-areas")}}. This creates two grid areas, one covering four grid cells, the other two.

+ +
+ + +
.wrapper {
+  display: grid;
+  grid-template-columns: repeat(3,1fr);
+  grid-template-rows: 100px 100px;
+  grid-template-areas:
+    "a a b"
+    "a a b";
+}
+.item1 {
+  grid-area: a;
+}
+.item2 {
+  grid-area: b;
+}
+
+ +
<div class="wrapper">
+   <div class="item1">Item</div>
+   <div class="item2">Item</div>
+</div>
+
+ +

{{ EmbedLiveSample('example_1', '300', '280') }}

+
+ +

Learn More

+ +

Property reference

+ + + +

Further reading

+ + -- cgit v1.2.3-54-g00ecf