<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>flexbox Archives - scmGalaxy</title>
	<atom:link href="https://www.scmgalaxy.com/tutorials/tag/flexbox/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.scmgalaxy.com/tutorials/tag/flexbox/</link>
	<description>A Platform for Software Engineers</description>
	<lastBuildDate>Wed, 13 Apr 2022 16:34:30 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1</generator>
	<item>
		<title>How to use Flex property in CSS?</title>
		<link>https://www.scmgalaxy.com/tutorials/how-to-use-flex-property-in-css/</link>
					<comments>https://www.scmgalaxy.com/tutorials/how-to-use-flex-property-in-css/#respond</comments>
		
		<dc:creator><![CDATA[rajeshkumar]]></dc:creator>
		<pubDate>Wed, 11 Aug 2021 13:13:46 +0000</pubDate>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[flex]]></category>
		<category><![CDATA[flexbox]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[property]]></category>
		<guid isPermaLink="false">https://www.scmgalaxy.com/tutorials/?p=7775</guid>

					<description><![CDATA[<p>This property is used to specify the length of the item, relative to the rest of the flexible items inside [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/how-to-use-flex-property-in-css/">How to use Flex property in CSS?</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">This property is used to specify the length of the item, relative to the rest of the flexible items inside the same container. If the element is not a flexible item, the flex property has no effect.</p>



<p class="wp-block-paragraph">The flex property is a shorthand for the <strong>flex-grow</strong>, <strong>flex-shrink</strong>, and <strong>flex-basis</strong> properties.</p>



<p class="wp-block-paragraph"><strong>Syntax: &#8211;</strong></p>



<p class="wp-block-paragraph">Selector { flex: flex-grow flex-shrink flex-basis}</p>



<p class="wp-block-paragraph"><strong>Ex: &#8211;</strong></p>



<p class="wp-block-paragraph">div { flex: 2 3;}</p>



<script src="https://gist.github.com/ajcotocus/ae0d267c544a8385e7651299d0b1909a.js"></script>



<figure class="wp-block-image size-full"><img fetchpriority="high" decoding="async" width="867" height="262" src="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/08/image-81.png" alt="" class="wp-image-7783" srcset="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/08/image-81.png 867w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/08/image-81-300x91.png 300w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/08/image-81-768x232.png 768w" sizes="(max-width: 867px) 100vw, 867px" /></figure>



<h2 class="wp-block-heading"><strong>FlexBox or Flexible Box</strong>&#8211;</h2>



<h3 class="wp-block-heading">What is it ?</h3>



<p class="wp-block-paragraph">–Its Layout mode a CSS 3 concept</p>



<h3 class="wp-block-heading">Why we need it ?</h3>



<p class="wp-block-paragraph">–It helps to create responsive web pages</p>



<h2 class="wp-block-heading"><strong>Flexbox Properties</strong>&#8211;</h2>



<ul class="wp-block-list"><li>flex-direction</li><li>flex-wrap</li><li>align-content</li><li>flex-flow</li><li>flow-grow</li><li>flow-shrink</li><li>flow-basis</li><li>flex</li></ul>



<h2 class="wp-block-heading"><strong>flex-direction</strong>&#8211;</h2>



<p class="wp-block-paragraph">This property is used to set the direction of flexible items. If the element is not a flexible item, the flex-direction property has no effect. We can set this property to <em>row</em> (default), <em>row-reverse, column, column-reverse</em>.</p>



<p class="wp-block-paragraph"><strong>Ex: &#8211;</strong></p>



<p class="wp-block-paragraph">div { flex-direction: column-reverse; }</p>



<ul class="wp-block-list"><li>row &#8211; This is used to display the flexible items horizontally as row</li><li>row-reverse &#8211; This is used to display the flexible items same as row, but in reverse order</li><li>column &#8211; This is used to display the flexible items vertically as column</li><li>column-reverse &#8211; This is used to display the flexible items same as column, but in reverse order</li></ul>



<h2 class="wp-block-heading"><strong>flex-wrap</strong>&#8211;</h2>



<p class="wp-block-paragraph">This property is used to specify whether the flexible items should wrap or not. If the elements are not flexible items, the flex-wrap property has no effect. We can set this property to <em>nowrap</em> (default), <em>wrap</em> and <em>wrap-reverse</em>.</p>



<p class="wp-block-paragraph">E<strong>x: &#8211;</strong></p>



<p class="wp-block-paragraph">div { flex-wrap: wrap; }</p>



<ul class="wp-block-list"><li>nowrap – It specifies that the flexible items will not wrap</li><li>wrap – It specifies that the flexible items will wrap if necessary</li><li>wrap-reverse – It specifies that the flexible items will wrap, if necessary, in reverse order</li></ul>



<h2 class="wp-block-heading"><strong>flex-flow</strong>&#8211;</h2>



<p class="wp-block-paragraph">It is a shorthand property for the flex-direction and the flex-wrap properties. If the elements are not flexible items, the flex-flow property has no effect.</p>



<p class="wp-block-paragraph">S<strong>yntax: &#8211;</strong></p>



<p class="wp-block-paragraph">Selector { flex-flow: flex-direction flex-wrap;}</p>



<p class="wp-block-paragraph">Ex<strong>: &#8211;</strong></p>



<p class="wp-block-paragraph">div { flex-flow: row-reverse wrap;}</p>



<ul class="wp-block-list"><li>Flex-direction values:</li><li>row (default)</li><li>row-reverse</li><li>Column</li><li>column-reverse.</li></ul>



<ul class="wp-block-list"><li>Flex-wrap values:</li><li>nowrap (default)</li><li>wrap</li><li>wrap-reverse</li></ul>



<h2 class="wp-block-heading"><strong>flex-grow</strong>&#8211;</h2>



<p class="wp-block-paragraph">This property is used to specify how much the item will grow relative to the rest of the flexible items inside the same container. If the element is not a flexible item, the flex-grow property has no effect. We can set this property to number (default 0).</p>



<p class="wp-block-paragraph">E<strong>x: &#8211;</strong></p>



<p class="wp-block-paragraph">div {flex-grow: 1;}</p>



<h2 class="wp-block-heading"><strong>flex-shrink</strong>&#8211;</h2>



<p class="wp-block-paragraph">This property is used to specify how the item will shrink relative to the rest of the flexible items inside the same container. If the element is not a flexible item, the flex-shrink property has no effect. We can set this property to number (default 1).</p>



<p class="wp-block-paragraph"><strong>Ex: &#8211;</strong></p>



<p class="wp-block-paragraph">div {flex-shrink: 2;}</p>



<h2 class="wp-block-heading"><strong>flex-basis</strong></h2>



<p class="wp-block-paragraph">This property is used to specify the initial length of a flexible item. If the element is not a flexible item, the flex-basis property has no effect. We can set this property to <em>number</em> and <em>auto</em> (default).</p>



<p class="wp-block-paragraph">Ex:<strong>&#8211;</strong></p>



<p class="wp-block-paragraph">div {flex-basis: 3;}</p>



<ul class="wp-block-list"><li>number &#8211; A length unit, or percentage, specifying the initial length of the flexible item(s)</li><li>auto &#8211; The length is equal to the length of the flexible item. If the item has no length specified, the length will be according to its content</li></ul>



<script src="https://gist.github.com/ajcotocus/a34029adbf9c39d18fa2c6eac9d8bb2e.js"></script>



<figure class="wp-block-image size-full"><img decoding="async" width="830" height="809" src="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/08/image-82.png" alt="" class="wp-image-7785" srcset="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/08/image-82.png 830w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/08/image-82-300x292.png 300w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/08/image-82-768x749.png 768w" sizes="(max-width: 830px) 100vw, 830px" /></figure>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/how-to-use-flex-property-in-css/">How to use Flex property in CSS?</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.scmgalaxy.com/tutorials/how-to-use-flex-property-in-css/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
