 
    
<?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>box-sizing Archives - Complete, Concrete, Concise</title>
	<atom:link href="https://complete-concrete-concise.com/tag/box-sizing/feed/" rel="self" type="application/rss+xml" />
	<link>https://complete-concrete-concise.com/tag/box-sizing/</link>
	<description>Practical Information Without The Bloat</description>
	<lastBuildDate>Sat, 18 Mar 2023 19:55:18 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9</generator>
	<item>
		<title>CSS &#8211; How and When to Use Float</title>
		<link>https://complete-concrete-concise.com/tutorials/webdev/front-end-basics/css-how-and-when-to-use-float/</link>
		
		<dc:creator><![CDATA[richardsplanet]]></dc:creator>
		<pubDate>Mon, 25 Jun 2018 12:54:41 +0000</pubDate>
				<category><![CDATA[Front-End Basics]]></category>
		<category><![CDATA[box-sizing]]></category>
		<category><![CDATA[calc()]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[css3]]></category>
		<category><![CDATA[float]]></category>
		<category><![CDATA[how to]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[learn]]></category>
		<category><![CDATA[tutorial]]></category>
		<guid isPermaLink="false">https://complete-concrete-concise.com/?p=3743</guid>

					<description><![CDATA[<p>Floats are easier to use when you know when and how you should be using them.</p>
<p>The post <a href="https://complete-concrete-concise.com/tutorials/webdev/front-end-basics/css-how-and-when-to-use-float/">CSS &#8211; How and When to Use Float</a> appeared first on <a href="https://complete-concrete-concise.com">Complete, Concrete, Concise</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div class="preamble">While <span class="css-property">float</span> is not ideal for every column organizing idea, it is a tried and true method and works well with older web browsers.<br />
In this tutorial we are going to look at some best practices for the use of floating HTML elements.</div>
<h2>Contents</h2>
<ol type="1">
<li><a href="#divide-the-page-so-floats-are-in-their-own-block">Divide the Page so Floats are in their own Block</a></li>
<li><a href="#float-everything-in-the-same-direction">Float Everything in the Same Direction</a>
<ol type="1">
<li><a href="#everything-floating-left">Everything Floating Left</a></li>
<li><a href="#everything-floating-right">Everything Floating Right</a></li>
<li><a href="#mixed-left-and-right-floats">Mixed Left and Right Floats</a></li>
</ol>
</li>
<li><a href="#when-you-want-floats-to-overlap-other-blocks">When You Want Floats to Overlap other Blocks</a></li>
<li><a href="#float-and-box-sizing"><span class="css-property">float</span> and <span class="css-property">box-sizing</span></a></li>
<li><a href="#calc"><span class="css-function">calc()</span></a></li>
<li><a href="#summary">Summary</a></li>
<li><a href="#playing-around">Playing Around</a></li>
<li><a href="#references">References</a></li>
</ol>
<h2 id="divide-the-page-so-floats-are-in-their-own-block">Divide the Page so Floats are in their own Block</h2>
<p>When you <span class="html-tag">div</span>ide up a page, you want to ensure that floating elements are contained inside their own stacking block and <span class="css-class">.clearfix</span> is applied to that block.<br />
Notice how the 3 small floating images are in their own block, with other elements stacking above and below:</p>
<div style="width: 70%; background: yellow; text-align: center; height: 50px; margin: auto; padding-top: 16px;">Header section</div>
<div style="width: 70%; background: green; margin: auto;">
<div style="width: 80%; background: cyan; margin: auto; padding: 2em 0 2em 0; text-align: center;">Large image goes here.</div>
<div style="border: 0.5em solid black;">
<div style="width: 80%; margin: auto;">
<div style="width: 30%; height: 50px; margin: 1.66%; background: lime; text-align: center; float: left;">Smaller image</div>
<div style="width: 30%; height: 50px; margin: 1.66%; background: lime; text-align: center; float: left;">Smaller image</div>
<div style="width: 30%; height: 50px; margin: 1.66%; background: lime; text-align: center; float: left;">Smaller image</div>
<div style="clear: both;"></div>
</div>
</div>
</div>
<div style="width: 70%; background: fuchsia; text-align: center; margin: auto;">Footer section</div>
<p>In general, you want to use floats to make elements flow horizontally inside a vertically stacking block.<br />
As much as possible, avoid having floating elements actually floating on top of other elements &#8211; but there are exceptions.</p>
<h2 id="float-everything-in-the-same-direction">Float Everything in the Same Direction</h2>
<p>As a general rule, you should float all your elements in the same direction. For English language websites (or any other language that is written from left-to-right), you want to use <span class="css-property">float: left</span>.</p>
<h3 id="everything-floating-left">Everything Floating Left</h3>
<p>Consider the following <span class="css-value">left</span> floating elements which overflow and wrap:</p>
<div style="text-align: center; line-height: 4em;">
<div style="width: 40%; background: yellow; float: left;">float:left</div>
<div style="width: 40%; background: lime; float: left;">float:left</div>
<div style="width: 40%; background: orange; float: left;">float:left</div>
<div style="clear: both; margin: 1em;"></div>
</div>
<p>While there is too much white space on the right side, the overall flow and alignment look fine.</p>
<h3 id="everything-floating-right">Everything Floating Right</h3>
<p>Consider the following <span class="css-value">right</span> floating elements which overflow and wrap:</p>
<div style="text-align: center; line-height: 4em;">
<div style="width: 40%; background: yellow; float: right;">float:right</div>
<div style="width: 40%; background: lime; float: right;">float:right</div>
<div style="width: 40%; background: orange; float: right;">float:right</div>
<div style="clear: both; margin: 1em;"></div>
</div>
<p>There is too much white space on the left side and the right alignment looks somewhat “unnatural” or out of place.<br />
Floating to the right is a good choice for webpages written in languages written from right to left.<a id="fnref1" class="footnote-ref" href="#fn1"><sup>1</sup></a></p>
<h3 id="mixed-left-and-right-floats">Mixed Left and Right Floats</h3>
<p>Consider the following floating elements which overflow and wrap. The left-most elements are floated <span class="css-value">left</span> and the right-most element is floated to the <span class="css-value">right</span>:</p>
<div style="text-align: center; line-height: 4em;">
<div style="width: 40%; background: yellow; float: left;">float:left</div>
<div style="width: 40%; background: lime; float: left;">float:left</div>
<div style="width: 40%; background: orange; float: right;">float:right</div>
<div style="clear: both; margin: 1em;"></div>
</div>
<p>The way the content overflows doesn’t look quite right.</p>
<h2 id="when-you-want-floats-to-overlap-other-blocks">When You Want Floats to Overlap other Blocks</h2>
<p>There are times when you want a floating element to overlap other blocks. The most common is getting text to flow around an image:</p>
<div class="html-output"><img decoding="async" style="float: left; margin-right: 1em; width: 125px;" src="https://complete-concrete-concise.com/wp-content/uploads/2018/05/26-dog-compressor.jpg">Having text flow around an embedded image looks natural and is what most people would expect because this is a common layout style we find in books and magazines.<br />
So this is one case where it makes sense to allow a floating image block to overlap with paragraph blocks.</div>
<p>Another common case is when you want to insert a side note or comment as a visible part of your content.<br />
Consider the following (although you might want to justify the text to make it less ragged):</p>
<div class="html-output">Another common use for a float that overlaps HTML blocks in your content is when you want to insert some sort of side note for the reader.</p>
<div style="float: right; background: cornsilk; border: 1px solid black; margin-left: 1em; width: 35%; padding: 0.5em;">According to legend, Galileo Galilei dropped two canon balls of different mass from the top of the tower to show they fell at the same speed.</div>
<p>For example, you might be writing a document on the Tower of Pisa &#8211; which is more commonly known as the “Leaning Tower of Pisa”.<br />
In the course of the article you will likely mention a number of facts about the tower. You might also want to mention something that doesn’t really belong in the main text, but is still a fun fact.<br />
One way to do this would be to use a footnote or endnote. Another way, would be to insert it into the main text, but set it apart.</p>
</div>
<p>When you choose to deliberately overlap HTML blocks, you need to be careful about ensuring the floating element does not overlap blocks it shouldn’t.</p>
<h2 id="float-and-box-sizing"><span class="css-property">float</span> and <span class="css-property">box-sizing</span></h2>
<p>Earlier, we saw <a href="https://complete-concrete-concise.com/tutorials/webdev/front-end-basics/nine-more-css-properties-to-play-with#box-sizing">the <span class="css-property">box-sizing</span> property</a> which instructs the User Agent (browser) to size HTML elements by either content area (default) or border. Recall the CSS box model:<br />
<img decoding="async" src="https://complete-concrete-concise.com/wp-content/uploads/2018/04/15-css-box-model.png"><br />
Sizing using the <span class="css-value">content-box</span> does not include the padding, border, or margin when setting the size of the HTML element.<br />
Sizing using the <span class="css-value">border-box</span> includes the padding and border when setting the size of an HTML element. It does not include the margin in the size of the element.<br />
For <strong>normal flow</strong> objects, this doesn’t make much difference to the layout since objects just flow downwards.<br />
When we apply <span class="css-property">float</span> to objects, they flow horizontally and will overflow and wrap around when they reach the edge of the browser &#8211; so we have to be more careful when specifying dimensions for floating objects. It is usually best to use <span class="css-property">box-sizing: border-box</span> for floating HTML elements. Consider the following styling and code:</p>
<div id="cb1" class="sourceCode">
<pre class="sourceCode css"><code class="sourceCode css"><a id="cb1-1" class="sourceLine" data-line-number="1"></a><span class="fu">.parent</span> {
<a id="cb1-2" class="sourceLine" data-line-number="2"></a>  <span class="kw">margin</span>: <span class="dv">auto</span>;
<a id="cb1-3" class="sourceLine" data-line-number="3"></a>  <span class="kw">width</span>: <span class="dv">300px</span>;
<a id="cb1-4" class="sourceLine" data-line-number="4"></a>  <span class="kw">background-color</span>: <span class="dv">yellow</span>;
<a id="cb1-5" class="sourceLine" data-line-number="5"></a>}
<a id="cb1-6" class="sourceLine" data-line-number="6"></a>
<a id="cb1-7" class="sourceLine" data-line-number="7"></a><span class="fu">.clearfix</span><span class="in">::after</span> {
<a id="cb1-8" class="sourceLine" data-line-number="8"></a>  <span class="kw">clear</span>: <span class="dv">both</span>;
<a id="cb1-9" class="sourceLine" data-line-number="9"></a>  <span class="kw">display</span>: <span class="dv">block</span>;
<a id="cb1-10" class="sourceLine" data-line-number="10"></a>  <span class="kw">content</span>: <span class="st">""</span>;
<a id="cb1-11" class="sourceLine" data-line-number="11"></a>}
<a id="cb1-12" class="sourceLine" data-line-number="12"></a>
<a id="cb1-13" class="sourceLine" data-line-number="13"></a><span class="fu">.block</span> {
<a id="cb1-14" class="sourceLine" data-line-number="14"></a>  <span class="kw">width</span>: <span class="dv">100px</span>;
<a id="cb1-15" class="sourceLine" data-line-number="15"></a>  <span class="kw">height</span>: <span class="dv">50px</span>;
<a id="cb1-16" class="sourceLine" data-line-number="16"></a>  <span class="kw">background-color</span>: <span class="dv">red</span>;
<a id="cb1-17" class="sourceLine" data-line-number="17"></a>  <span class="kw">float</span>:<span class="dv">left</span>;
<a id="cb1-18" class="sourceLine" data-line-number="18"></a>}</code></pre>
</div>
<div id="cb2" class="sourceCode">
<pre class="sourceCode html"><code class="sourceCode html"><a id="cb2-1" class="sourceLine" data-line-number="1"></a><span class="kw">&lt;div</span><span class="ot"> class=</span><span class="st">"parent clearfix"</span><span class="kw">&gt;</span>
<a id="cb2-2" class="sourceLine" data-line-number="2"></a>  <span class="kw">&lt;div</span><span class="ot"> class=</span><span class="st">"block"</span><span class="kw">&gt;&lt;/div&gt;</span>
<a id="cb2-3" class="sourceLine" data-line-number="3"></a>  <span class="kw">&lt;div</span><span class="ot"> class=</span><span class="st">"block"</span><span class="kw">&gt;&lt;/div&gt;</span>
<a id="cb2-4" class="sourceLine" data-line-number="4"></a>  <span class="kw">&lt;div</span><span class="ot"> class=</span><span class="st">"block"</span><span class="kw">&gt;&lt;/div&gt;</span>
<a id="cb2-5" class="sourceLine" data-line-number="5"></a><span class="kw">&lt;/div&gt;</span></code></pre>
</div>
<p>Which results in:</p>
<div class="html-output">
<div style="margin: auto; width: 300px; background-color: yellow;">
<div style="width: 100px; height: 50px; background-color: red; float: left;"></div>
<div style="width: 100px; height: 50px; background-color: red; float: left;"></div>
<div style="width: 100px; height: 50px; background-color: red; float: left;"></div>
<div style="clear: both;"></div>
</div>
</div>
<p>There is no obvious separation between one child block and another, since they all run together. The obvious solution is to insert a bit of space between them. We can do this by giving each child block a small margin (let’s say 10px all around):</p>
<div class="html-output">
<div style="margin: auto; width: 300px; background-color: yellow;">
<div style="width: 100px; height: 50px; background-color: red; float: left; margin: 10px;"></div>
<div style="width: 100px; height: 50px; background-color: red; float: left; margin: 10px;"></div>
<div style="width: 100px; height: 50px; background-color: red; float: left; margin: 10px;"></div>
<div style="clear: both;"></div>
</div>
</div>
<p>Unfortunately, this causes the child blocks to overflow and wrap around. Remember:</p>
<ol type="1">
<li>the parent container is 300px wide,</li>
<li>each child is 100px wide,</li>
<li>each child has a 10px margin,</li>
<li>this makes each child block 100px + 10px + 10 px = 120px wide (there are 10px for the left margin and 10px for the right margin) and</li>
<li>50px + 10px + 10px = 70px high (there are 10px for the top margin and 10px for the bottom margin)</li>
</ol>
<p>The height of the child blocks is not the problem for us, it is the width, so we can adjust our CSS to account for the 10px margin on the left and right of the child block:</p>
<div id="cb3" class="sourceCode">
<pre class="sourceCode css"><code class="sourceCode css"><a id="cb3-1" class="sourceLine" data-line-number="1"></a><span class="fu">.block</span> {
<a id="cb3-2" class="sourceLine" data-line-number="2"></a>  <span class="kw">margin</span>: <span class="dv">10px</span>;
<a id="cb3-3" class="sourceLine" data-line-number="3"></a>  <span class="kw">width</span>: <span class="dv">80px</span>;
<a id="cb3-4" class="sourceLine" data-line-number="4"></a>  <span class="kw">height</span>: <span class="dv">50px</span>;
<a id="cb3-5" class="sourceLine" data-line-number="5"></a>  <span class="kw">background-color</span>: <span class="dv">red</span>;
<a id="cb3-6" class="sourceLine" data-line-number="6"></a>  <span class="kw">float</span>:<span class="dv">left</span>;
<a id="cb3-7" class="sourceLine" data-line-number="7"></a>}</code></pre>
</div>
<p>Which gives us the result we would expect:</p>
<div class="html-output">
<div style="margin: auto; width: 300px; background-color: yellow;">
<div style="width: 80px; height: 50px; background-color: red; float: left; margin: 10px;"></div>
<div style="width: 80px; height: 50px; background-color: red; float: left; margin: 10px;"></div>
<div style="width: 80px; height: 50px; background-color: red; float: left; margin: 10px;"></div>
<div style="clear: both;"></div>
</div>
</div>
<p>If we decide to add a border (even just a 1px border) or padding (even just 1px of padding), it will cause the elements to wrap (again).<br />
We can compensate by subtracting the added widths of our border and padding, or we can set the <span class="css-property">box-sizing</span> property to <span class="css-value">border-box</span>:</p>
<div id="cb4" class="sourceCode">
<pre class="sourceCode css"><code class="sourceCode css"><a id="cb4-1" class="sourceLine" data-line-number="1"></a>* {
<a id="cb4-2" class="sourceLine" data-line-number="2"></a>  <span class="kw">box-sizing</span>: <span class="dv">border-box</span>;
<a id="cb4-3" class="sourceLine" data-line-number="3"></a>}</code></pre>
</div>
<p>Using the <strong>universal</strong> selector will cause all HTML elements to be sized according to their borders and not their content area. Personally, I think it is easier and more intuitive to work this way. When you layout the content on a page you imagine each block of content as being completely self contained &#8211; i.e., it includes the content, the padding around the content, and the border around the content. However, you do have to compensate for any margins you might use.</p>
<h2 id="calc"><span class="css-function">calc()</span></h2>
<p>We’ve seen that <strong>%</strong> is a more convenient way of dimensioning floating elements than using pixels. If you want 3 equally sized columns you can make them each <span class="css-value">33.33%</span> of the width of the parent container. You could also make 2 of them <span class="css-value">25%</span> and one <span class="css-value">50%</span>. Unfortunately, this makes compensating for margins a bit trickier.<br />
CSS has a function called <span class="css-function">calc()</span> that makes this a lot easier. You simply enter the dimensions &#8211; even if they are different units &#8211; and <span class="css-function">calc()</span> will perform the necessary calculation for you.<br />
Taking the example above, we can write the CSS code for the blocks as follows:</p>
<div id="cb5" class="sourceCode">
<pre class="sourceCode css"><code class="sourceCode css"><a id="cb5-1" class="sourceLine" data-line-number="1"></a><span class="fu">.block</span> {
<a id="cb5-2" class="sourceLine" data-line-number="2"></a>  <span class="kw">margin</span>: <span class="dv">10px</span>;
<a id="cb5-3" class="sourceLine" data-line-number="3"></a>  <span class="kw">width</span>: calc(<span class="dv">33.33%</span> - <span class="dv">10px</span> - <span class="dv">10px</span>);
<a id="cb5-4" class="sourceLine" data-line-number="4"></a>  <span class="kw">height</span>: <span class="dv">50px</span>;
<a id="cb5-5" class="sourceLine" data-line-number="5"></a>  <span class="kw">background-color</span>: <span class="dv">red</span>;
<a id="cb5-6" class="sourceLine" data-line-number="6"></a>  <span class="kw">float</span>:<span class="dv">left</span>;
<a id="cb5-7" class="sourceLine" data-line-number="7"></a>}</code></pre>
</div>
<p>The <span class="css-property">width</span> is set to <span class="css-value">33.33%</span> less <span class="css-value">10px</span> for the left margin and <span class="css-value">10px</span> for the right margin. It could have also been written as <span class="css-function">calc(33.33% &#8211; 20px)</span>, but I chose to <strong>explicitly</strong> subtract each margin independently for clarity.</p>
<h2 id="summary">Summary</h2>
<ol type="1">
<li>Divide the vertically stacking blocks</li>
<li>Try to contain horizontally stacking blocks (floating elements) in their own vertically stacking block.</li>
<li>As a general rules, you want all your floats to go in the same direction. In most cases this will be <span class="cwss-property">float: left</span>. If you are developing webpages for a language that is written right-to-left, you will prefer [float: right]{css-property}</li>
<li>Mixing <span class="cwss-property">float: left</span> and <span class="cwss-property">float: right</span> in the same containing block is, usually, a bad idea.</li>
<li>Sometimes, you do want floating elements to overlap other blocks (like images, or side notes). In this case, you need to ensure appropriate overlapping.</li>
<li>Setting your HTML elements to have <span class="css-property">box-sizing: border-box</span> makes it easier to layout horizontally flowing elements, since it takes into account any border and padding values you set.</li>
<li>Regardless of which <span class="css-property">box-sizing</span> model you choose, you must always compensate for any margin values you apply.</li>
<li>The CSS function <span class="css-function">calc()</span> makes it easier to compute box sizes. It even allows mixing units (like pixels and % together).</li>
</ol>
<h2 id="playing-around">Playing Around</h2>
<h3 id="dividing-up-a-page">Dividing Up a Page</h3>
<p>Learning how to divide up a page layout into HTML block elements is crucial to being able to code that page.</p>
<ol type="1">
<li>Explore a number of websites (news websites tend to be very good for this<a id="fnref2" class="footnote-ref" href="#fn2"><sup>2</sup></a>) and pay attention to how the pages are laid out.</li>
<li>How would you arrange the various HTML elements to create a similar layout?
<ol type="1">
<li>Which are the vertically flowing blocks?</li>
<li>How are vertical elements nested inside of blocks?</li>
</ol>
</li>
<li>Can you code a page with a similar layout?</li>
</ol>
<p>Many of these sites have very long pages. It is not necessary to replicate the entire page from top to bottom &#8211; just focus on the portion of the page you see in your browser window.<br />
Don’t try to mimic all the functionality or behaviour. You haven’t learned to embed videos yet (just substitute a picture). There are effects (like shadows, animations, or dropdowns) that you haven’t learned either. Just focus on getting the general layout and look, more or less, right.</p>
<h3 id="box-sizing-and-calc"><span class="css-property">box-sizing</span> and <span class="css-function">calc()</span></h3>
<ol type="1">
<li>Experiment with using <span class="css-property">box-sizing: border-box</span>. You can do this by setting all HTML elements to have this property.</li>
<li>Experiment using the <span class="css-function">calc()</span> function.</li>
</ol>
<p>You can use these with the page layouts you try out above.</p>
<h2 id="references">References</h2>
<ol type="1">
<li><a href="https://www.w3.org/TR/CSS21/visuren.html#propdef-float"><span class="css-property">float</span> property</a></li>
<li><a href="https://www.w3.org/TR/CSS21/visuren.html#propdef-clear"><span class="css-property">clear</span> property</a></li>
<li><a href="https://drafts.csswg.org/css-ui-3/#box-sizing"><span class="css-property">box-sizing</span> property</a></li>
<li><a href="https://drafts.csswg.org/css-values-3/#calc-notation"><span class="css-function">calc()</span> function</a></li>
</ol>
<div class="prev"><a href="https://complete-concrete-concise.com/tutorials/webdev/front-end-basics/css-a-simple-page-using-float">Prev</a></div>
<div class="next"><a href="https://complete-concrete-concise.com/tutorials/webdev/front-end-basics/css-a-more-advanced-float-example-part-1/">Next</a></div>
<div class="clear"></div>
<section class="footnotes">
<hr>
<ol>
<li id="fn1">The most commonly used RTL languages are Arabic, Hebrew, Persian, and Urdu.<a class="footnote-back" href="#fnref1">↩</a></li>
<li id="fn2">Some sites that I find interesting for their layout include: <a href="https://www.cbc.ca/">CBC</a>, <a href="https://bbc.co.uk">BBC</a>, <a href="https://www.engadget.com/">Engadget</a>. Of course, you are free to try and copy the look and layout of other sites as well.<a class="footnote-back" href="#fnref2">↩</a></li>
</ol>
</section>
<p>The post <a href="https://complete-concrete-concise.com/tutorials/webdev/front-end-basics/css-how-and-when-to-use-float/">CSS &#8211; How and When to Use Float</a> appeared first on <a href="https://complete-concrete-concise.com">Complete, Concrete, Concise</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Nine More CSS Properties to Play With</title>
		<link>https://complete-concrete-concise.com/tutorials/webdev/front-end-basics/nine-more-css-properties-to-play-with/</link>
		
		<dc:creator><![CDATA[richardsplanet]]></dc:creator>
		<pubDate>Wed, 25 Apr 2018 10:56:13 +0000</pubDate>
				<category><![CDATA[Front-End Basics]]></category>
		<category><![CDATA[box-sizing]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[font-family]]></category>
		<category><![CDATA[font-size]]></category>
		<category><![CDATA[font-style]]></category>
		<category><![CDATA[font-weight]]></category>
		<category><![CDATA[height]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[line-height]]></category>
		<category><![CDATA[magin-top]]></category>
		<category><![CDATA[margin]]></category>
		<category><![CDATA[margin-bottom]]></category>
		<category><![CDATA[margin-left]]></category>
		<category><![CDATA[margin-right]]></category>
		<category><![CDATA[padding]]></category>
		<category><![CDATA[padding-bottom]]></category>
		<category><![CDATA[padding-left]]></category>
		<category><![CDATA[padding-right]]></category>
		<category><![CDATA[padding-top]]></category>
		<category><![CDATA[text-align]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[webdev]]></category>
		<category><![CDATA[width]]></category>
		<guid isPermaLink="false">https://complete-concrete-concise.com/?p=3627</guid>

					<description><![CDATA[<p>Expand your CSS styling vocabulary with 9 more properties and expand your knowledge of margin and padding.</p>
<p>The post <a href="https://complete-concrete-concise.com/tutorials/webdev/front-end-basics/nine-more-css-properties-to-play-with/">Nine More CSS Properties to Play With</a> appeared first on <a href="https://complete-concrete-concise.com">Complete, Concrete, Concise</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div class="preamble">
<p>So far, we have restricted ourselves to a handful of CSS Properties as we familiarize ourselves with how CSS and the Box Model.</p>
<p>This tutorial expands your vocabulary with 9 new properties.</p>
</div>
<p>We’ve seen these 6 CSS properties:</p>
<ol type="1">
<li><span class="css-property">color</span></li>
<li><span class="css-property">background-color</span></li>
<li><span class="css-property">padding</span></li>
<li><span class="css-property">border</span></li>
<li><span class="css-property">margin</span></li>
<li><span class="css-property">display</span></li>
</ol>
<p>They allow you to play around with the text and background colours and the space around your content.</p>
<p>We’ll expand our knowledge of the <span class="css-property">margin</span> and <span class="css-property">padding</span> properties and add learn another 9 CSS properties to allow you to give a bit more style to your document.</p>
<p>As with the previous 6 properties, we won’t cover them all in full detail &#8211; just enough to so you can use them and become familiar with them. They will be covered in more detail in future tutorials.</p>
<h2>
Contents<br />
</h2>
<ol type="1">
<li><a href="#margin">margin</a>
<ol type="1">
<li><a href="#specific-margin-styling">Specific Margin Styling</a></li>
<li><a href="#styling-with-4-margin-values">Styling with 4 Margin Values</a></li>
<li><a href="#styling-with-2-margin-values">Styling with 2 Margin Values</a></li>
</ol>
</li>
<li><a href="#padding">padding</a>
<ol type="1">
<li><a href="#specific-padding-styling">Specific Padding Styling</a></li>
<li><a href="#styling-with-4-padding-values">Styling with 4 Padding Values</a></li>
<li><a href="#styling-with-2-padding-values">Styling with 2 Padding Values</a></li>
</ol>
</li>
<li><a href="#width">width</a>
<ol type="1">
<li><a href="#width-and-the-img-tag">width and the &lt;img&gt; tag</a></li>
</ol>
</li>
<li><a href="#height">height</a></li>
<li><a href="#box-sizing">box-sizing</a></li>
<li><a href="#font-size">font-size</a>
</li>
<li><a href="#font-family">font-family</a></li>
<li><a href="#font-weight">font-weight</a></li>
<li><a href="#font-style">font-style</a></li>
<li><a href="#line-height">line-height</a></li>
<li><a href="#text-align">text-align</a></li>
<li><a href="#conclusion">Conclusion</a></li>
<li><a href="#playing-around">Playing Around</a></li>
<li><a href="#references">References</a></li>
</ol>
<h2 id="margin">margin</h2>
<p>You have seen how to set all margins around an HTML <strong>element</strong> to the same value:</p>
<div class="sourceCode" id="cb1">
<pre class="sourceCode css"><code class="sourceCode css"><a class="sourceLine" id="cb1-1" data-line-number="1">p {</a>
<a class="sourceLine" id="cb1-2" data-line-number="2">  <span class="kw">margin</span>: <span class="dv">16px</span>;</a>
<a class="sourceLine" id="cb1-3" data-line-number="3">}</a></code></pre>
</div>
<p>The above code fragment will set all margins around the paragraph <strong>element</strong> to 16px.</p>
<p><strong>Remember</strong>: top and bottom margins are ignored for HTML elements with the <span class="css-property">display</span> property set to <strong>inline</strong>.</p>
<h3 id="specific-margin-styling">Specific Margin Styling</h3>
<p>You can choose which margin to style:</p>
<div class="sourceCode" id="cb2">
<pre class="sourceCode css"><code class="sourceCode css"><a class="sourceLine" id="cb2-1" data-line-number="1"><span class="fu">.left-margin</span> {</a>
<a class="sourceLine" id="cb2-2" data-line-number="2">  <span class="kw">margin-left</span>: <span class="dv">16px</span>;</a>
<a class="sourceLine" id="cb2-3" data-line-number="3">}</a>
<a class="sourceLine" id="cb2-4" data-line-number="4"></a>
<a class="sourceLine" id="cb2-5" data-line-number="5"><span class="fu">.right-margin</span> {</a>
<a class="sourceLine" id="cb2-6" data-line-number="6">  <span class="kw">margin-right</span>: <span class="dv">16px</span>;</a>
<a class="sourceLine" id="cb2-7" data-line-number="7">}</a>
<a class="sourceLine" id="cb2-8" data-line-number="8"></a>
<a class="sourceLine" id="cb2-9" data-line-number="9"><span class="fu">.top-margin</span> {</a>
<a class="sourceLine" id="cb2-10" data-line-number="10">  <span class="kw">margin-top</span>: <span class="dv">16px</span>;</a>
<a class="sourceLine" id="cb2-11" data-line-number="11">}</a>
<a class="sourceLine" id="cb2-12" data-line-number="12"></a>
<a class="sourceLine" id="cb2-13" data-line-number="13"><span class="fu">.bottom-margin</span> {</a>
<a class="sourceLine" id="cb2-14" data-line-number="14">  <span class="kw">margin-bottom</span>: <span class="dv">16px</span>;</a>
<a class="sourceLine" id="cb2-15" data-line-number="15">}</a></code></pre>
</div>
<p>Each class in the code fragment above applies a margin value to a specific side.</p>
<h3 id="styling-with-4-margin-values">Styling with 4 Margin Values</h3>
<p>You can individually style all four margin in a single line:</p>
<div class="sourceCode" id="cb3">
<pre class="sourceCode css"><code class="sourceCode css"><a class="sourceLine" id="cb3-1" data-line-number="1"><span class="fu">.custom-margins</span> {</a>
<a class="sourceLine" id="cb3-2" data-line-number="2">  <span class="kw">margin</span>: <span class="dv">8px</span> <span class="dv">10px</span> <span class="dv">4px</span> <span class="dv">16px</span>;</a>
<a class="sourceLine" id="cb3-3" data-line-number="3">}</a></code></pre>
</div>
<p>The margin values start at the top and are given in clockwise order:</p>
<ol type="1">
<li>top</li>
<li>right</li>
<li>bottom</li>
<li>left</li>
</ol>
<h3 id="styling-with-2-margin-values">Styling with 2 Margin Values</h3>
<p>If the top and bottom margins are the same and the left and right margins are the same, then you can style them in a single line:</p>
<div class="sourceCode" id="cb4">
<pre class="sourceCode css"><code class="sourceCode css"><a class="sourceLine" id="cb4-1" data-line-number="1"><span class="fu">.custom-margins</span> {</a>
<a class="sourceLine" id="cb4-2" data-line-number="2">  <span class="kw">margin</span>: <span class="dv">0px</span> <span class="dv">16px</span>;</a>
<a class="sourceLine" id="cb4-3" data-line-number="3">}</a></code></pre>
</div>
<p>The first value is the top and bottom margin value. The second value is the left and right margin value.</p>
<h2 id="padding">padding</h2>
<p>You have seen how to set all the padding around HTML <strong>content</strong> to the same value:</p>
<div class="sourceCode" id="cb5">
<pre class="sourceCode css"><code class="sourceCode css"><a class="sourceLine" id="cb5-1" data-line-number="1">p {</a>
<a class="sourceLine" id="cb5-2" data-line-number="2">  <span class="kw">padding</span>: <span class="dv">16px</span>;</a>
<a class="sourceLine" id="cb5-3" data-line-number="3">}</a></code></pre>
</div>
<p>The above code fragment will set all the padding around the paragraph <strong>content</strong> to 16px.</p>
<h3 id="specific-padding-styling">Specific Padding Styling</h3>
<p>You can choose which side to apply padding to:</p>
<div class="sourceCode" id="cb6">
<pre class="sourceCode css"><code class="sourceCode css"><a class="sourceLine" id="cb6-1" data-line-number="1"><span class="fu">.left-margin</span> {</a>
<a class="sourceLine" id="cb6-2" data-line-number="2">  <span class="kw">padding-left</span>: <span class="dv">16px</span>;</a>
<a class="sourceLine" id="cb6-3" data-line-number="3">}</a>
<a class="sourceLine" id="cb6-4" data-line-number="4"></a>
<a class="sourceLine" id="cb6-5" data-line-number="5"><span class="fu">.right-margin</span> {</a>
<a class="sourceLine" id="cb6-6" data-line-number="6">  <span class="kw">padding-right</span>: <span class="dv">16px</span>;</a>
<a class="sourceLine" id="cb6-7" data-line-number="7">}</a>
<a class="sourceLine" id="cb6-8" data-line-number="8"></a>
<a class="sourceLine" id="cb6-9" data-line-number="9"><span class="fu">.top-padding</span> {</a>
<a class="sourceLine" id="cb6-10" data-line-number="10">  <span class="kw">padding-top</span>: <span class="dv">16px</span>;</a>
<a class="sourceLine" id="cb6-11" data-line-number="11">}</a>
<a class="sourceLine" id="cb6-12" data-line-number="12"></a>
<a class="sourceLine" id="cb6-13" data-line-number="13"><span class="fu">.bottom-padding</span> {</a>
<a class="sourceLine" id="cb6-14" data-line-number="14">  <span class="kw">padding-bottom</span>: <span class="dv">16px</span>;</a>
<a class="sourceLine" id="cb6-15" data-line-number="15">}</a></code></pre>
</div>
<p>Each class in the code fragment above applies a padding value to a specific side.</p>
<h3 id="styling-with-4-padding-values">Styling with 4 Padding Values</h3>
<p>You can individually style all four padding values in a single line:</p>
<div class="sourceCode" id="cb7">
<pre class="sourceCode css"><code class="sourceCode css"><a class="sourceLine" id="cb7-1" data-line-number="1"><span class="fu">.custom-padding</span> {</a>
<a class="sourceLine" id="cb7-2" data-line-number="2">  <span class="kw">padding</span>: <span class="dv">8px</span> <span class="dv">10px</span> <span class="dv">4px</span> <span class="dv">16px</span>;</a>
<a class="sourceLine" id="cb7-3" data-line-number="3">}</a></code></pre>
</div>
<p>The padding values start at the top and are given in clockwise order:</p>
<ol type="1">
<li>top</li>
<li>right</li>
<li>bottom</li>
<li>left</li>
</ol>
<h3 id="styling-with-2-padding-values">Styling with 2 Padding Values</h3>
<p>If the top and bottom padding is the same and the left and right padding is the same, then you can style them in a single line:</p>
<div class="sourceCode" id="cb8">
<pre class="sourceCode css"><code class="sourceCode css"><a class="sourceLine" id="cb8-1" data-line-number="1"><span class="fu">.custom-padding</span> {</a>
<a class="sourceLine" id="cb8-2" data-line-number="2">  <span class="kw">padding</span>: <span class="dv">0px</span> <span class="dv">16px</span>;</a>
<a class="sourceLine" id="cb8-3" data-line-number="3">}</a></code></pre>
</div>
<p>This first value is the top and bottom padding value. The second value is the left and right padding value.</p>
<h2 id="width">width</h2>
<p>You’ve seen that block elements take up the full width of the container they are in. The <span class="css-property">width</span> allows you to control the width of the HTML content:</p>
<div class="sourceCode" id="cb9">
<pre class="sourceCode css"><code class="sourceCode css"><a class="sourceLine" id="cb9-1" data-line-number="1"><span class="fu">.width-test</span> {</a>
<a class="sourceLine" id="cb9-2" data-line-number="2">  <span class="kw">width</span>: <span class="dv">200px</span>;</a>
<a class="sourceLine" id="cb9-3" data-line-number="3">  <span class="kw">border</span>: <span class="dv">2px</span> <span class="dv">solid</span> <span class="dv">red</span>;</a>
<a class="sourceLine" id="cb9-4" data-line-number="4">  <span class="kw">background-color</span>:lightgray;</a>
<a class="sourceLine" id="cb9-5" data-line-number="5">}</a></code></pre>
</div>
<p>As with other CSS properties, you specify dimensions in pixels.<a href="#fn1" class="footnote-ref" id="fnref1"><sup>1</sup></a></p>
<p>Applying the above code fragment to the following HTML code:</p>
<div class="sourceCode" id="cb10">
<pre class="sourceCode html"><code class="sourceCode html"><a class="sourceLine" id="cb10-1" data-line-number="1"><span class="kw">&lt;p</span><span class="ot"> class=</span><span class="st">&quot;width-test&quot;</span><span class="kw">&gt;</span></a>
<a class="sourceLine" id="cb10-2" data-line-number="2">  This is a 200 pixel wide test paragraph.</a>
<a class="sourceLine" id="cb10-3" data-line-number="3"><span class="kw">&lt;/p&gt;</span></a>
<a class="sourceLine" id="cb10-4" data-line-number="4"><span class="kw">&lt;p</span><span class="ot"> class=</span><span class="st">&quot;width-test&quot;</span><span class="kw">&gt;</span></a>
<a class="sourceLine" id="cb10-5" data-line-number="5">  Another paragraph.</a>
<a class="sourceLine" id="cb10-6" data-line-number="6"><span class="kw">&lt;/p&gt;</span></a></code></pre>
</div>
<p>will result in something like the following:</p>
<p style="width:200px;border:2px solid red;background:lightgray;">
This is a 200 pixel wide test paragraph.
</p>
<p style="width:200px;border:2px solid red;background:lightgray;">
Another paragraph.
</p>
<p>Notice that the HTML element:</p>
<ul>
<li>no longer expands to fill the full width of the container</li>
<li>the block elements still follow normal HTML flow and stack one atop the other<a href="#fn2" class="footnote-ref" id="fnref2"><sup>2</sup></a></li>
</ul>
<h3 id="width-and-the-img-tag">width and the &lt;img&gt; tag</h3>
<p>Setting the <span class="css-property">width</span> property on an <span class="html-tag">img</span> tag to <span class="css-value">100%</span>, will scale the image to fit the enclosing container<a href="#fn3" class="footnote-ref" id="fnref3"><sup>3</sup></a> without distorting the image.</p>
<div class="sourceCode" id="cb11">
<pre class="sourceCode css"><code class="sourceCode css"><a class="sourceLine" id="cb11-1" data-line-number="1">img {</a>
<a class="sourceLine" id="cb11-2" data-line-number="2">  <span class="kw">width</span>: <span class="dv">100%</span>;</a>
<a class="sourceLine" id="cb11-3" data-line-number="3">}</a></code></pre>
</div>
<p>Consider the following 400x400px image:</p>
<p><img fetchpriority="high" decoding="async" src="https://complete-concrete-concise.com/wp-content/uploads/2018/04/22-img-width-400-min.jpg" alt="Labrador Retriever puppy sitting in grass." width="400" height="400" class="aligncenter size-full wp-image-3746" srcset="https://complete-concrete-concise.com/wp-content/uploads/2018/04/22-img-width-400-min.jpg 400w, https://complete-concrete-concise.com/wp-content/uploads/2018/04/22-img-width-400-min-150x150.jpg 150w, https://complete-concrete-concise.com/wp-content/uploads/2018/04/22-img-width-400-min-300x300.jpg 300w" sizes="(max-width: 400px) 100vw, 400px" /></p>
<p>If we style the <span class="html-tag">img</span> tag to have a <span class="css-property">width</span> of <span class="css-value">100%</span>:</p>
<div class="sourceCode" id="cb12">
<pre class="sourceCode css"><code class="sourceCode css"><a class="sourceLine" id="cb12-1" data-line-number="1">img {</a>
<a class="sourceLine" id="cb12-2" data-line-number="2">  <span class="kw">width</span>: <span class="dv">100%</span>;</a>
<a class="sourceLine" id="cb12-3" data-line-number="3">}</a></code></pre>
</div>
<p>and insert the image inside smaller and larger containers:</p>
<div class="sourceCode" id="cb13">
<pre class="sourceCode html"><code class="sourceCode html"><a class="sourceLine" id="cb13-1" data-line-number="1"><span class="kw">&lt;div</span><span class="ot"> class=</span><span class="st">&quot;small-container&quot;</span><span class="kw">&gt;</span></a>
<a class="sourceLine" id="cb13-2" data-line-number="2">  <span class="kw">&lt;img</span><span class="ot"> src=</span><span class="st">&quot;image.jpg&quot;</span><span class="kw">&gt;</span></a>
<a class="sourceLine" id="cb13-3" data-line-number="3"><span class="kw">&lt;/div&gt;</span></a>
<a class="sourceLine" id="cb13-4" data-line-number="4"></a>
<a class="sourceLine" id="cb13-5" data-line-number="5"><span class="kw">&lt;div</span><span class="ot"> class=</span><span class="st">&quot;large-container&quot;</span><span class="kw">&gt;</span></a>
<a class="sourceLine" id="cb13-6" data-line-number="6">  <span class="kw">&lt;img</span><span class="ot"> src=</span><span class="st">&quot;image.jpg&quot;</span><span class="kw">&gt;</span></a>
<a class="sourceLine" id="cb13-7" data-line-number="7"><span class="kw">&lt;/div&gt;</span></a></code></pre>
</div>
<p>where:</p>
<div class="sourceCode" id="cb14">
<pre class="sourceCode css"><code class="sourceCode css"><a class="sourceLine" id="cb14-1" data-line-number="1"><span class="fu">.small-container</span> {</a>
<a class="sourceLine" id="cb14-2" data-line-number="2">  <span class="kw">width</span>: <span class="dv">200px</span>;</a>
<a class="sourceLine" id="cb14-3" data-line-number="3">}</a>
<a class="sourceLine" id="cb14-4" data-line-number="4"></a>
<a class="sourceLine" id="cb14-5" data-line-number="5"><span class="fu">.large-container</span> {</a>
<a class="sourceLine" id="cb14-6" data-line-number="6">  <span class="kw">width</span>: <span class="dv">500px</span>;</a>
<a class="sourceLine" id="cb14-7" data-line-number="7">}</a></code></pre>
</div>
<p>We get the following results:</p>
<div class="html-output">
<p>
200px wide container:
</p>
<div style="width:200px;">
<img decoding="async" src="https://complete-concrete-concise.com/wp-content/uploads/2018/04/22-img-width-400-min.jpg" alt="Labrador Retriever puppy sitting in grass."/>
</div>
<p>
500px wide container:
</p>
<div style="width:500px;">
<img decoding="async" style="width:100%;" src="https://complete-concrete-concise.com/wp-content/uploads/2018/04/22-img-width-400-min.jpg" alt="Labrador Retriever puppy sitting in grass."/>
</div>
</div>
<h2 id="height">height</h2>
<p>You’ve seen that HTML elements expand in height to fit whatever content they contain. Just as you can specify the width of the HTML element, you can also specify its height:</p>
<div class="sourceCode" id="cb15">
<pre class="sourceCode css"><code class="sourceCode css"><a class="sourceLine" id="cb15-1" data-line-number="1"><span class="fu">.height-test</span> {</a>
<a class="sourceLine" id="cb15-2" data-line-number="2">  <span class="kw">height</span>: <span class="dv">100px</span>;</a>
<a class="sourceLine" id="cb15-3" data-line-number="3">  <span class="kw">border</span>: <span class="dv">5px</span> <span class="dv">green</span> <span class="dv">solid</span>;</a>
<a class="sourceLine" id="cb15-4" data-line-number="4">  <span class="kw">background-color</span>: <span class="dv">yellow</span>;</a>
<a class="sourceLine" id="cb15-5" data-line-number="5">}</a></code></pre>
</div>
<p>As with many of the other CSS properties, you specify dimensions in pixels.</p>
<p>Applying the above code fragment to the following HTML code:</p>
<div class="sourceCode" id="cb16">
<pre class="sourceCode html"><code class="sourceCode html"><a class="sourceLine" id="cb16-1" data-line-number="1"><span class="kw">&lt;p</span><span class="ot"> class=</span><span class="st">&quot;height-test&quot;</span><span class="kw">&gt;</span></a>
<a class="sourceLine" id="cb16-2" data-line-number="2">  This paragraph box is 100px high.</a>
<a class="sourceLine" id="cb16-3" data-line-number="3"><span class="kw">&lt;/p&gt;</span></a></code></pre>
</div>
<p>will result in something like the following:</p>
<p style="height:100px;border:5px solid green;background:yellow;">
This paragraph box is 100px high..
</p>
<p>Notice that the HTML element is now 200 pixels high, even though it doesn’t need to be.</p>
<p>You can combine the width and height:</p>
<div class="sourceCode" id="cb17">
<pre class="sourceCode css"><code class="sourceCode css"><a class="sourceLine" id="cb17-1" data-line-number="1"><span class="fu">.width-height-test</span> {</a>
<a class="sourceLine" id="cb17-2" data-line-number="2">  <span class="kw">width</span>: <span class="dv">200px</span>;</a>
<a class="sourceLine" id="cb17-3" data-line-number="3">  <span class="kw">height</span>: <span class="dv">200px</span>;</a>
<a class="sourceLine" id="cb17-4" data-line-number="4">  <span class="kw">border</span>: <span class="dv">2px</span> <span class="dv">solid</span> <span class="dv">black</span>;</a>
<a class="sourceLine" id="cb17-5" data-line-number="5">  <span class="kw">background</span>: <span class="dv">lime</span>;</a>
<a class="sourceLine" id="cb17-6" data-line-number="6">}</a></code></pre>
</div>
<p>Applying the above code fragment to:</p>
<div class="sourceCode" id="cb18">
<pre class="sourceCode html"><code class="sourceCode html"><a class="sourceLine" id="cb18-1" data-line-number="1"><span class="kw">&lt;p</span><span class="ot"> class=</span><span class="st">&quot;width-height-test&quot;</span><span class="kw">&gt;&lt;/p&gt;</span></a></code></pre>
</div>
<p>Results in:</p>
<p style="width:200px;height:200px;border:2px solid black;background:lime;">
<h2 id="box-sizing">box-sizing</h2>
<p>By default, the <span class="css-property">width</span> and <span class="css-property">height</span> set the dimensions of the <strong>content</strong> area of the CSS Box Model. Any padding or borders you add are extra on top of the width and height.</p>
<p>However, Microsoft’s Internet Explorer used what is commonly known as the <strong>broken box model</strong>. Internet Explorer considered the padding and borders as part of the width and height of the HTML element.</p>
<p>In both cases, margins are always extra on top of whatever width or height you set.</p>
<p>Consider the following two HTML paragraph elements:<a href="#fn4" class="footnote-ref" id="fnref4"><sup>4</sup></a></p>
<p style="box-sizing:content-box; border:5px solid black;padding:20px;width:200px;height:200px;background:lime;">
width = 200px, <br /> height = 200px, <br />border = 5px <br /> padding = 20px, <br />Content sizing
</p>
<p style="box-sizing:border-box; border:5px solid black;padding:20px;width:200px;height:200px;background:yellow;">
width = 200px, <br /> height = 200px, <br /> border = 5px, <br /> padding = 20px, <br />Border sizing
</p>
<p>Both have exactly the same settings for:</p>
<ul>
<li>width</li>
<li>height</li>
<li>padding</li>
<li>border</li>
</ul>
<p>The green element is sized using the standard model which applies the width and height only to the content of the CSS Box. The padding and borders add extra width and height to the element.</p>
<p>The yellow element is sized using Internet Explorer’s <strong>broken box model</strong> which applies the width and height to the borders of the CSS Box. All padding and content is contained within that.</p>
<p>You can choose which model you want to use:</p>
<ul>
<li><strong>content-box</strong> &#8211; this is the default behaviour and can be considered to put the content “first” since it sizes the space for the content. However, it can make for more difficult layouts because changing the padding or border changes the size of the element on the page.</li>
<li><strong>border-box</strong> &#8211; this can be considered to put the layout “first” since it sizes the space for the entire HTML element (content + padding + border).</li>
</ul>
<p>Regardless of which box sizing method you choose, margins always add extra space.</p>
<p>Normally, you don’t set this property on an element by element basis, but for all elements in the document:</p>
<div class="sourceCode" id="cb20">
<pre class="sourceCode css"><code class="sourceCode css"><a class="sourceLine" id="cb20-1" data-line-number="1">* {</a>
<a class="sourceLine" id="cb20-2" data-line-number="2">  <span class="kw">box-sizing</span>: <span class="dv">border-box</span>;</a>
<a class="sourceLine" id="cb20-3" data-line-number="3">}</a></code></pre>
</div>
<p>The above code fragment will change the <span class="css-property">box-sizing</span> to <strong>border-box</strong> for all elements in the document. This is a typical use for the <strong>Universal</strong> selector.</p>
<p>This might seem somewhat pointless since the only layout flow you know is top to bottom (and nesting elements inside other elements). However, in a future tutorial, you will see how to change the normal <em>top to bottom</em> HTML flow so that HTML elements flow from <em>left to right</em> or <em>right to left</em>.</p>
<h2 id="font-size">font-size</h2>
<p>Fonts are graphical representations of characters that are (usually) used for text.<a href="#fn5" class="footnote-ref" id="fnref5"><sup>5</sup></a></p>
<p>In general, the default font size in a browser is set to 16 pixels.<a href="#fn6" class="footnote-ref" id="fnref6"><sup>6</sup></a></p>
<p>You can change the size using the CSS property <span class="css-property">font-size</span>:</p>
<div class="sourceCode" id="cb21">
<pre class="sourceCode css"><code class="sourceCode css"><a class="sourceLine" id="cb21-1" data-line-number="1"><span class="fu">.large-font</span> {</a>
<a class="sourceLine" id="cb21-2" data-line-number="2">  <span class="kw">font-size</span>: <span class="dv">32px</span>;</a>
<a class="sourceLine" id="cb21-3" data-line-number="3">}</a></code></pre>
</div>
<p>The size is given in pixels.<a href="#fn7" class="footnote-ref" id="fnref7"><sup>7</sup></a></p>
<p style="font-size:32px; border:2px solid black;background:yellow;padding:0.5em; line-height:40px">
A sample paragraph with the font size set to 32px (and some other styling for background color and border).
</p>
<h2 id="font-family">font-family</h2>
<p>You can specify which font should be used. For this tutorial we only cover the 3 major font families:</p>
<ul>
<li><strong>serif</strong>: <span style="font-family:serif;">serif fonts have small strokes attached to the tips of each letter. <strong>Time New Roman</strong> is an example of a serif font.</span></li>
<li><strong>sans-serif</strong>: <span style="font-family:sans-serif;">sans-serif fonts do not have the extra strokes attached to each letter. <strong>Verdana</strong> or <strong>Arial</strong> are examples of san-serif fonts.</span></li>
<li><strong>monospace</strong>: <span style="font-family:monospace;">monospace fonts have characters that are all the same width. They may be serif or sans-serif. <strong>Courier New</strong> is an example of a monospace font.</span></li>
</ul>
<p>You can change the font family (the style of the font) using the <span class="css-property">font-family</span> property:</p>
<div class="sourceCode" id="cb22">
<pre class="sourceCode css"><code class="sourceCode css"><a class="sourceLine" id="cb22-1" data-line-number="1"><span class="fu">.serif</span> {</a>
<a class="sourceLine" id="cb22-2" data-line-number="2">  <span class="kw">font-family</span>: <span class="dv">serif</span>;</a>
<a class="sourceLine" id="cb22-3" data-line-number="3">}</a>
<a class="sourceLine" id="cb22-4" data-line-number="4"></a>
<a class="sourceLine" id="cb22-5" data-line-number="5"><span class="fu">.sans</span> {</a>
<a class="sourceLine" id="cb22-6" data-line-number="6">  <span class="kw">font-family</span>: <span class="dv">sans-serif</span>;</a>
<a class="sourceLine" id="cb22-7" data-line-number="7">}</a>
<a class="sourceLine" id="cb22-8" data-line-number="8"></a>
<a class="sourceLine" id="cb22-9" data-line-number="9"><span class="fu">.mono</span> {</a>
<a class="sourceLine" id="cb22-10" data-line-number="10">  <span class="kw">font-family</span>: <span class="dv">monospace</span>;</a>
<a class="sourceLine" id="cb22-11" data-line-number="11">}</a></code></pre>
</div>
<p>The above code fragment defines 3 different classes that can be used to change the font family.</p>
<p>In a future tutorial, we will see how to specify a specific font (like Arial or Times New Roman).<a href="#fn8" class="footnote-ref" id="fnref8"><sup>8</sup></a></p>
<h2 id="font-weight">font-weight</h2>
<p>Most fonts come in two weights: normal and bold. There can be more,<a href="#fn9" class="footnote-ref" id="fnref9"><sup>9</sup></a> but, for now, we only consider those two because those are the two most common font weights. Very few fonts have more than those two weights &#8211; sometimes they only have one weight.</p>
<p>You style it using the <span class="css-property">font-weight</span> property:</p>
<div class="sourceCode" id="cb23">
<pre class="sourceCode css"><code class="sourceCode css"><a class="sourceLine" id="cb23-1" data-line-number="1"><span class="fu">.bold-font</span> {</a>
<a class="sourceLine" id="cb23-2" data-line-number="2">  <span class="kw">font-weight</span>: <span class="dv">bold</span>;</a>
<a class="sourceLine" id="cb23-3" data-line-number="3">}</a>
<a class="sourceLine" id="cb23-4" data-line-number="4"></a>
<a class="sourceLine" id="cb23-5" data-line-number="5"><span class="fu">.normal-font</span> {</a>
<a class="sourceLine" id="cb23-6" data-line-number="6">  <span class="kw">font-weight</span>: <span class="dv">normal</span>;</a>
<a class="sourceLine" id="cb23-7" data-line-number="7">}</a></code></pre>
</div>
<p>The above code fragment implements two classes that allow setting the font weight for an HTML element.</p>
<p>Applied to paragraph tags (with a bit of extra styling), the result looks like this:</p>
<p style="background:yellow;font-weight:normal">
This is some normal text.
</p>
<p style="background:yellow;font-weight:bold">
This is some bold text.
</p>
<h2 id="font-style">font-style</h2>
<p>Fonts have 3 different styles:</p>
<ul>
<li><strong>normal</strong>: this is the normal font</li>
<li><strong>italic</strong>: this is distinct from the normal font. It is typically designed to have an inclined appearance and calligraphic (handwritten) feel to it</li>
<li><strong>oblique</strong>: this is the normal font that has been tilted (typically about 10°) to the right.</li>
</ul>
<p>In practice, italic and oblique are pretty much synonymous<a href="#fn10" class="footnote-ref" id="fnref10"><sup>10</sup></a>.</p>
<div class="sourceCode" id="cb24">
<pre class="sourceCode css"><code class="sourceCode css"><a class="sourceLine" id="cb24-1" data-line-number="1"><span class="fu">.normal-style</span> {</a>
<a class="sourceLine" id="cb24-2" data-line-number="2">  <span class="kw">font-style</span>: <span class="dv">normal</span>;</a>
<a class="sourceLine" id="cb24-3" data-line-number="3">}</a>
<a class="sourceLine" id="cb24-4" data-line-number="4"></a>
<a class="sourceLine" id="cb24-5" data-line-number="5"><span class="fu">.italic-style</span> {</a>
<a class="sourceLine" id="cb24-6" data-line-number="6">  <span class="kw">font-style</span>: <span class="dv">italic</span>;</a>
<a class="sourceLine" id="cb24-7" data-line-number="7">}</a>
<a class="sourceLine" id="cb24-8" data-line-number="8"></a>
<a class="sourceLine" id="cb24-9" data-line-number="9"><span class="fu">.oblique-style</span> {</a>
<a class="sourceLine" id="cb24-10" data-line-number="10">  <span class="kw">font-style</span>: <span class="dv">oblique</span>;</a>
<a class="sourceLine" id="cb24-11" data-line-number="11">}</a></code></pre>
</div>
<p>Applied to paragraph tags (with a bit of extra styling), the result looks something like this:</p>
<p style="background:yellow;font-style:normal; font-family:serif; font-size:2em;padding:0.5em;">
This is some normal text.
</p>
<p style="background:yellow;font-style:oblique; font-family:serif; font-size:2em;;padding:0.5em;">
This is some oblique text.
</p>
<p style="background:yellow;font-style:italic; font-family:serif; font-size:2em;;padding:0.5em;">
This is some italic text.
</p>
<p>If your browser’s default serif font has italics, you will notice a difference between the oblique and italic text. You will see that the oblique is simply the normal skewed to the right.</p>
<h2 id="line-height">line-height</h2>
<p>You can also adjust the height of your lines using the <span class="css-property">line-height</span> property.</p>
<p>Single space lines would have the same height as the <span class="css-property">font-size</span>:</p>
<div class="sourceCode" id="cb25">
<pre class="sourceCode css"><code class="sourceCode css"><a class="sourceLine" id="cb25-1" data-line-number="1"><span class="fu">.single</span> {</a>
<a class="sourceLine" id="cb25-2" data-line-number="2">  <span class="kw">font-size</span>: <span class="dv">16px</span>;</a>
<a class="sourceLine" id="cb25-3" data-line-number="3">  <span class="kw">line-height</span>: <span class="dv">16px</span>;</a>
<a class="sourceLine" id="cb25-4" data-line-number="4">}</a>
<a class="sourceLine" id="cb25-5" data-line-number="5"></a>
<a class="sourceLine" id="cb25-6" data-line-number="6"><span class="fu">.double</span> {</a>
<a class="sourceLine" id="cb25-7" data-line-number="7">  <span class="kw">font-size</span>: <span class="dv">16px</span>;</a>
<a class="sourceLine" id="cb25-8" data-line-number="8">  <span class="kw">line-height</span>: <span class="dv">32px</span>;</a>
<a class="sourceLine" id="cb25-9" data-line-number="9">}</a></code></pre>
</div>
<p>The above code fragment applied to the following paragraphs results in something like this:</p>
<p style="line-height:1em; border:2px solid black;background:yellow;">
This paragraph has been styled to use a line-height equal to the font size. This makes the text “single spaced”. Depending on the font used, it can appear too dense. Normally, you would use a line height around 1.5 times the font size.
</p>
<p style="line-height:2em; border:2px solid black;background:yellow;">
This paragraph has been styled to use a line-height equal to double the font size. This makes the text “double spaced”. Depending on the font used, it can appear too sparse. Normally, you would use a line height around 1.5 times the font size.
</p>
<p style="line-height:1.5em; border:2px solid black;background:yellow;">
This paragraph has been styled to use a line-height equal to 1.5 times the font size. This makes the text. This is, typically, a good line spacing to use. Normally, you would use a line height around 1.5 times the font size.
</p>
<h2 id="text-align">text-align</h2>
<p>You can set your text alignment:</p>
<ul>
<li><strong>right</strong>: the text is right justified. This means the text lines up on the right side of the HTML element</li>
<li><strong>left</strong>: the text is left justified. This means the text lines up on the left side of the HTML element</li>
<li><strong>center</strong>: the text is horizontally centered inside the HTML element.</li>
<li><strong>justify</strong>: the text is fully justified. This means the text lines up on both the left and right side of the HTML element. White space is inserted as needed to justify the text.</li>
</ul>
<div class="sourceCode" id="cb26">
<pre class="sourceCode css"><code class="sourceCode css"><a class="sourceLine" id="cb26-1" data-line-number="1"><span class="fu">.right-align</span> {</a>
<a class="sourceLine" id="cb26-2" data-line-number="2">  <span class="kw">text-align</span>: <span class="dv">right</span>;</a>
<a class="sourceLine" id="cb26-3" data-line-number="3">}</a>
<a class="sourceLine" id="cb26-4" data-line-number="4"></a>
<a class="sourceLine" id="cb26-5" data-line-number="5"><span class="fu">.left-align</span> {</a>
<a class="sourceLine" id="cb26-6" data-line-number="6">  <span class="kw">text-align</span>: <span class="dv">left</span>;</a>
<a class="sourceLine" id="cb26-7" data-line-number="7">}</a>
<a class="sourceLine" id="cb26-8" data-line-number="8"></a>
<a class="sourceLine" id="cb26-9" data-line-number="9"><span class="fu">.center-align</span> {</a>
<a class="sourceLine" id="cb26-10" data-line-number="10">  <span class="kw">text-align</span>: <span class="dv">center</span>;</a>
<a class="sourceLine" id="cb26-11" data-line-number="11">}</a>
<a class="sourceLine" id="cb26-12" data-line-number="12"></a>
<a class="sourceLine" id="cb26-13" data-line-number="13"><span class="fu">.justified-align</span> {</a>
<a class="sourceLine" id="cb26-14" data-line-number="14">  <span class="kw">text-align</span>: <span class="dv">justify</span>;</a>
<a class="sourceLine" id="cb26-15" data-line-number="15">}</a></code></pre>
</div>
<p>The code fragment above applied to the following paragraphs results in something like:</p>
<p style="text-align:right; border:2px solid black;background:yellow">
This paragraph is right aligned. The text lines up on the right side of the HTML element. The left side can be ragged.
</p>
<p style="text-align:left; border:2px solid black;background:yellow;">
This paragraph is left aligned. This means the text lines up on the left side of the HTML element. The right side can be ragged.
</p>
<p style="text-align:center; border:2px solid black;background:yellow;">
This paragraph is centered. This means the text horizontally centers itself inside the HTML element. The left and right sides can be ragged.
</p>
<p style="text-align:justify; border:2px solid black;background:yellow;">
This paragraph is justified. This means the text lines up on both the left and the right side of the HTML element. The left and right side will not be ragged except, possibly, the right side of the last line.
</p>
<h2 id="conclusion">Conclusion</h2>
<p>We covered quite a lot of stuff &#8211; but don’t worry, there is still plenty more.</p>
<ol type="1">
<li>There are multiple ways to style margins around HTML <strong>elements</strong>:
<ol type="1">
<li>Setting all margins to the same value by providing a single value to the <span class="css-property">margin</span> property</li>
<li>Setting each margin individually using the <span class="css-property">margin-left</span>, <span class="css-property">margin-right</span>, <span class="css-property">margin-top</span>, <span class="css-property">margin-bottom</span> properties.</li>
<li>Setting all margin values individually in a single line by providing 4 values to the <span class="css-property">margin</span> property. The margin values are given in clockwise order starting from the top: top, right, bottom, left.</li>
</ol>
</li>
<li>Remember that top and bottom margins are ignored for inline elements.</li>
<li>There are multiple ways to style padding around HTML <strong>content</strong>:
<ol type="1">
<li>Setting all padding to the same value by providing a single value to the <span class="css-property">padding</span> property</li>
<li>Setting each padding value individually using the <span class="css-property">padding-left</span>, <span class="css-property">padding-right</span>, <span class="css-property">padding-top</span>, <span class="css-property">padding-bottom</span> properties.</li>
<li>Setting all padding values individually in a single line by providing 4 values to the <span class="css-property">padding</span> property. The padding values are given in clockwise order starting from the top: top, right, bottom, left.</li>
</ol>
</li>
<li>The <span class="css-property">width</span> property allows you set the width of an HTML element. The width is given in pixels.</li>
<li>The <span class="css-property">height</span> property allows you set the height of an HTML element. The height is given in pixels.</li>
<li>By default, the width and height is applied to the <strong>content</strong> of the HTML element.</li>
<li>If you want the width and height to apply to the entire HTML element, including <strong>content</strong>, <strong>padding</strong>, and <strong>margins</strong>, then you set the <span class="css-property">box-sizing</span> property to <em>border-box</em>.</li>
<li>The <span class="css-property">font-size</span> property allows you set the size of the font inside an HTML element. The size is given in pixels.</li>
<li>In general, the default font size is 16px.</li>
<li>The <span class="css-property">font-family</span> property allows you set the type of font used inside an HTML element. The 3 main font types are:
<ul>
<li>serif (<span style="font-family:serif">Serif Example</span>)</li>
<li>sans-serif (<span style="font-family:sans-serif">San Serif Example</span>)</li>
<li>monospace (<span style="font-family:monospace">Monospace Example</span>)</li>
</ul>
</li>
<li>The <span class="css-property">font-weight</span> property allows you set the weight of the font inside an HTML element. The common weights are:
<ul>
<li>normal (<span style="font-weight:normal">Normal Example</span>)</li>
<li>bold (<span style="font-weight:bold">Bold Example</span>)</li>
</ul>
</li>
<li>The <span class="css-property">font-style</span> property allows you set the style of the font inside an HTML element. The 3 styles are:
<ul>
<li>normal (<span style="font-style:normal">Normal Example</span>)</li>
<li>oblique (<span style="font-style:oblique">Oblique Example</span>)</li>
<li>italic (<span style="font-style:italic">Italic Example</span>)</li>
</ul>
</li>
<li>Italic and oblique are very similar. User agents (browsers) commonly substitute oblique for italic if an italic version of the font is not available.</li>
<li>The <span class="css-property">line-height</span> property allows you set the height of the line inside an HTML element. The height is given in pixels.</li>
<li>Typical line heights are 1.5 times the font-size.</li>
<li>The <span class="css-property">text-align</span> property allows you specify how text is to be aligned inside an HTML element. The 4 alignment values are:
<ul>
<li>left</li>
<li>right</li>
<li>center</li>
<li>justify</li>
</ul>
</li>
</ol>
<h2 id="playing-around">Playing Around</h2>
<p>The best way to learn is to play around with what you have learned.</p>
<p>You have enough knowledge now to create the following style of webpage:</p>
<div style="background:white;padding:1em;">
<p style="margin:auto;width:60%;padding:1em;background:cornsilk;text-align:center;">
Header / Title
</p>
<p style="margin:auto;width:60%;padding:1em;background:aliceblue;text-align:left;">
A whole bunch of content. You don’t need to go overboard. The goal is to practice and reinforce your knowledge, not get bored.
</p>
<p style="margin:auto;width:60%;padding:1em;background:#FFF0F8;text-align:center;">
Copyright / Footer
</p>
</div>
<p>There are a number of ways to do this (I will show 3 in the next tutorial).</p>
<ol type="1">
<li>Don’t try to get the document looking good at all kinds of resolutions. Just make it look good in your browser at whatever resolution you are using. Future tutorials will get into how to make your site <strong>responsive</strong>.</li>
<li>What do you need to do to get a uniform margin on the left-hand side?</li>
<li>How are you going to control the width of the content in the center?</li>
<li>Don’t worry about background colours (I just used them in the example to highlight the task)</li>
<li>You don’t have to use all the HTML elements and CSS properties you have seen.</li>
<li>You want the content (roughly) in the center of the page.</li>
<li>The content width should be constrained.</li>
<li>The title should be centered.</li>
<li>The copyright should be centered.</li>
</ol>
<h2 id="references">References</h2>
<ol type="1">
<li><a href="https://drafts.csswg.org/css-box-3/#margin-props">margin</a></li>
<li><a href="https://drafts.csswg.org/css-box-3/#padding-props">padding</a></li>
<li><a href="https://www.w3.org/TR/CSS2/visudet.html#the-width-property">width</a></li>
<li><a href="https://www.w3.org/TR/CSS2/visudet.html#the-height-property">height</a></li>
<li><a href="https://drafts.csswg.org/css-ui-3/#box-sizing">box-sizing</a></li>
<li><a href="https://www.w3.org/TR/CSS2/fonts.html#propdef-font-size">font-size</a></li>
<li><a href="https://www.w3.org/TR/CSS2/fonts.html#propdef-font-family">font-family</a></li>
<li><a href="https://www.w3.org/TR/CSS2/fonts.html#propdef-font-weight">font-weight</a></li>
<li><a href="https://www.w3.org/TR/CSS2/fonts.html#propdef-font-style">font-style</a></li>
<li><a href="https://www.w3.org/TR/CSS2/visudet.html#propdef-line-height">line-height</a></li>
<li><a href="https://www.w3.org/TR/CSS2/text.html#alignment-prop">text-align</a></li>
</ol>
<div class="prev">
<p><a href="https://complete-concrete-concise.com/tutorials/webdev/front-end-basics/five-examples-using-css-selectors">Prev</a></p>
</div>
<div class="next">
<p><a href="#">Next</a></p>
</div>
<div class="clear">
</div>
<section class="footnotes">
<hr />
<ol>
<li id="fn1">
<p>There are numerous ways to specify dimensions in CSS. For now, we will stick with pixels. Future tutorials will cover other dimensions.<a href="#fnref1" class="footnote-back">↩</a></p>
</li>
<li id="fn2">
<p>Getting HTML elements to flow one after the other, instead of one atop the other, will be covered in a future tutorial.<a href="#fnref2" class="footnote-back">↩</a></p>
</li>
<li id="fn3">
<p>It is a little more complicated: you also need to set the <span class="css-property">height</span> to <span class="css-value">auto</span>. Because this is the default value, there is no need to explicitly set it to <span class="css-value">auto</span>.<a href="#fnref3" class="footnote-back">↩</a></p>
</li>
<li id="fn4">
<p>The CSS used for this example is:</p>
<div class="sourceCode" id="cb19">
<pre class="sourceCode css"><code class="sourceCode css"><a class="sourceLine" id="cb19-1" data-line-number="1"><span class="fu">.content-box</span> {</a>
<a class="sourceLine" id="cb19-2" data-line-number="2">  <span class="kw">box-sizing</span>: <span class="dv">content-box</span>;</a>
<a class="sourceLine" id="cb19-3" data-line-number="3">  <span class="kw">border</span>: <span class="dv">5px</span> <span class="dv">solid</span> <span class="dv">black</span>;</a>
<a class="sourceLine" id="cb19-4" data-line-number="4">  <span class="kw">padding</span>: <span class="dv">20px</span>;<span class="kw">width</span>:<span class="dv">200px</span>;</a>
<a class="sourceLine" id="cb19-5" data-line-number="5">  <span class="kw">height</span>: <span class="dv">200px</span>;</a>
<a class="sourceLine" id="cb19-6" data-line-number="6">  <span class="kw">background</span>: <span class="dv">lime</span>;</a>
<a class="sourceLine" id="cb19-7" data-line-number="7">}</a>
<a class="sourceLine" id="cb19-8" data-line-number="8"></a>
<a class="sourceLine" id="cb19-9" data-line-number="9"><span class="fu">.border-box</span> {</a>
<a class="sourceLine" id="cb19-10" data-line-number="10">  <span class="kw">box-sizing</span>:<span class="dv">border-box</span>;</a>
<a class="sourceLine" id="cb19-11" data-line-number="11">  <span class="kw">border</span>: <span class="dv">5px</span> <span class="dv">solid</span> <span class="dv">black</span>;</a>
<a class="sourceLine" id="cb19-12" data-line-number="12">  <span class="kw">padding</span>: <span class="dv">20px</span>;</a>
<a class="sourceLine" id="cb19-13" data-line-number="13">  <span class="kw">width</span>: <span class="dv">200px</span>;</a>
<a class="sourceLine" id="cb19-14" data-line-number="14">  <span class="kw">height</span>: <span class="dv">200px</span>;</a>
<a class="sourceLine" id="cb19-15" data-line-number="15">  <span class="kw">background</span>: <span class="dv">yellow</span>;</a>
<a class="sourceLine" id="cb19-16" data-line-number="16">}</a></code></pre>
</div>
<p><a href="#fnref4" class="footnote-back">↩</a></li>
<li id="fn5">
<p>There are fonts that are just pure graphics / symbols / icons. <a href="https://fontawesome.com/">Fontawesome</a> is one such font library. We will look at it in a future tutorial.<a href="#fnref5" class="footnote-back">↩</a></p>
</li>
<li id="fn6">
<p>Most browsers let the user to change the default font (or text) size. Unfortunately, most websites do not respect this. This website does. If you go to your browser settings and change the text size, you will find this site adjusts accordingly. Go to pretty much any other website and you will find they ignore the user’s preferred font size settings.<a href="#fnref6" class="footnote-back">↩</a></p>
</li>
<li id="fn7">
<p>This will hard code the size of the font. In a future tutorial, we will see how to set the font size so it respects the users text size setting in the browser.<a href="#fnref7" class="footnote-back">↩</a></p>
</li>
<li id="fn8">
<p>Specifying a specific font is simple &#8211; just write its name. However, all things considered, it is a little more complicated. It is better to first learn the core principles before adding more complexity.<a href="#fnref8" class="footnote-back">↩</a></p>
</li>
<li id="fn9">
<p>This will be discussed more in a future tutorial.<a href="#fnref9" class="footnote-back">↩</a></p>
</li>
<li id="fn10">
<p>They’re not. An italic font is specially designed. An oblique font is simply the normal font skewed to the right.<a href="#fnref10" class="footnote-back">↩</a></p>
</li>
</ol>
</section>
<p>The post <a href="https://complete-concrete-concise.com/tutorials/webdev/front-end-basics/nine-more-css-properties-to-play-with/">Nine More CSS Properties to Play With</a> appeared first on <a href="https://complete-concrete-concise.com">Complete, Concrete, Concise</a>.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
