{"id":122,"date":"2026-04-07T04:22:46","date_gmt":"2026-04-07T04:22:46","guid":{"rendered":"https:\/\/gigz.pk\/css\/?post_type=lesson&#038;p=122"},"modified":"2026-04-07T04:22:47","modified_gmt":"2026-04-07T04:22:47","slug":"rows-columns","status":"publish","type":"lesson","link":"https:\/\/gigz.pk\/css\/lesson\/rows-columns\/","title":{"rendered":"Rows &amp; Columns"},"content":{"rendered":"\n<p>Rows and columns are the foundation of modern website layouts. They help organize content into structured sections, making pages clean, readable, and responsive.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">What Are Rows and Columns<\/h3>\n\n\n\n<p>A row is a horizontal section of a webpage that contains content. Inside each row, you can divide space into columns.<\/p>\n\n\n\n<p>A column is a vertical section inside a row. Columns allow you to place content side by side, such as text, images, or cards.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Why Rows and Columns Are Important<\/h3>\n\n\n\n<p>They create a clean and organized layout<br>They improve readability and user experience<br>They help design responsive websites for mobile and desktop<br>They make content alignment easier<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Basic Structure<\/h3>\n\n\n\n<p>A simple layout starts with a container. Inside the container, you create rows, and inside rows, you create columns.<\/p>\n\n\n\n<p>Example structure:<\/p>\n\n\n\n<p>Container<br>Row<br>Column<br>Column<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Rows and Columns Using CSS Flexbox<\/h3>\n\n\n\n<p>Flexbox is a simple way to create rows and columns.<\/p>\n\n\n\n<p>Example:<\/p>\n\n\n\n<p>.container {<br>display: flex;<br>flex-direction: column;<br>}<\/p>\n\n\n\n<p>.row {<br>display: flex;<br>}<\/p>\n\n\n\n<p>.column {<br>flex: 1;<br>padding: 10px;<br>}<\/p>\n\n\n\n<p>Explanation:<\/p>\n\n\n\n<p>The container is set to column direction so rows stack vertically<br>Each row uses flex display to align columns horizontally<br>Columns share equal space using flex property<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Rows and Columns Using CSS Grid<\/h3>\n\n\n\n<p>CSS Grid is a powerful layout system for creating rows and columns.<\/p>\n\n\n\n<p>Example:<\/p>\n\n\n\n<p>.container {<br>display: grid;<br>grid-template-columns: 1fr 1fr;<br>gap: 10px;<br>}<\/p>\n\n\n\n<p>Explanation:<\/p>\n\n\n\n<p>The layout creates two equal columns<br>The gap adds spacing between columns<br>You can easily control rows and columns together<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Responsive Design with Rows and Columns<\/h3>\n\n\n\n<p>Rows and columns should adjust for different screen sizes.<\/p>\n\n\n\n<p>Example:<\/p>\n\n\n\n<p>@media (max-width: 768px) {<br>.row {<br>flex-direction: column;<br>}<br>}<\/p>\n\n\n\n<p>Explanation:<\/p>\n\n\n\n<p>On smaller screens, columns stack vertically<br>This improves mobile viewing<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Common Use Cases<\/h3>\n\n\n\n<p>Creating website sections like header, content, and footer<br>Building image galleries<br>Designing product cards<br>Creating blog layouts<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Best Practices<\/h3>\n\n\n\n<p>Keep layouts simple and consistent<br>Use spacing to improve readability<br>Avoid too many columns on small screens<br>Test your design on different devices<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Summary<\/h3>\n\n\n\n<p>Rows and columns help structure web pages in a clean and flexible way. By using Flexbox or Grid, you can easily build modern, responsive layouts suitable for all screen sizes.<\/p>\n\n\n\n<p><\/p>\n","protected":false},"menu_order":0,"template":"","class_list":["post-122","lesson","type-lesson","status-publish","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Rows &amp; Columns - CSS learning mastery<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/gigz.pk\/css\/lesson\/rows-columns\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Rows &amp; Columns - CSS learning mastery\" \/>\n<meta property=\"og:description\" content=\"Rows and columns are the foundation of modern website layouts. They help organize content into structured sections, making pages clean, readable, and responsive. What Are Rows and Columns A row is a horizontal section of a webpage that contains content. Inside each row, you can divide space into columns. A column is a vertical section [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/gigz.pk\/css\/lesson\/rows-columns\/\" \/>\n<meta property=\"og:site_name\" content=\"CSS learning mastery\" \/>\n<meta property=\"article:modified_time\" content=\"2026-04-07T04:22:47+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/gigz.pk\\\/css\\\/lesson\\\/rows-columns\\\/\",\"url\":\"https:\\\/\\\/gigz.pk\\\/css\\\/lesson\\\/rows-columns\\\/\",\"name\":\"Rows &amp; Columns - CSS learning mastery\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/gigz.pk\\\/css\\\/#website\"},\"datePublished\":\"2026-04-07T04:22:46+00:00\",\"dateModified\":\"2026-04-07T04:22:47+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/gigz.pk\\\/css\\\/lesson\\\/rows-columns\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/gigz.pk\\\/css\\\/lesson\\\/rows-columns\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/gigz.pk\\\/css\\\/lesson\\\/rows-columns\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/gigz.pk\\\/css\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Rows &amp; Columns\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/gigz.pk\\\/css\\\/#website\",\"url\":\"https:\\\/\\\/gigz.pk\\\/css\\\/\",\"name\":\"CSS learning mastery\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/gigz.pk\\\/css\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Rows &amp; Columns - CSS learning mastery","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/gigz.pk\/css\/lesson\/rows-columns\/","og_locale":"en_US","og_type":"article","og_title":"Rows &amp; Columns - CSS learning mastery","og_description":"Rows and columns are the foundation of modern website layouts. They help organize content into structured sections, making pages clean, readable, and responsive. What Are Rows and Columns A row is a horizontal section of a webpage that contains content. Inside each row, you can divide space into columns. A column is a vertical section [&hellip;]","og_url":"https:\/\/gigz.pk\/css\/lesson\/rows-columns\/","og_site_name":"CSS learning mastery","article_modified_time":"2026-04-07T04:22:47+00:00","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/gigz.pk\/css\/lesson\/rows-columns\/","url":"https:\/\/gigz.pk\/css\/lesson\/rows-columns\/","name":"Rows &amp; Columns - CSS learning mastery","isPartOf":{"@id":"https:\/\/gigz.pk\/css\/#website"},"datePublished":"2026-04-07T04:22:46+00:00","dateModified":"2026-04-07T04:22:47+00:00","breadcrumb":{"@id":"https:\/\/gigz.pk\/css\/lesson\/rows-columns\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/gigz.pk\/css\/lesson\/rows-columns\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/gigz.pk\/css\/lesson\/rows-columns\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/gigz.pk\/css\/"},{"@type":"ListItem","position":2,"name":"Rows &amp; Columns"}]},{"@type":"WebSite","@id":"https:\/\/gigz.pk\/css\/#website","url":"https:\/\/gigz.pk\/css\/","name":"CSS learning mastery","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/gigz.pk\/css\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/gigz.pk\/css\/wp-json\/wp\/v2\/lesson\/122","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/gigz.pk\/css\/wp-json\/wp\/v2\/lesson"}],"about":[{"href":"https:\/\/gigz.pk\/css\/wp-json\/wp\/v2\/types\/lesson"}],"wp:attachment":[{"href":"https:\/\/gigz.pk\/css\/wp-json\/wp\/v2\/media?parent=122"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}