<?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>Coding Friends &#187; Box model</title>
	<atom:link href="http://www.codingfriends.com/index.php/tag/box-model/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.codingfriends.com</link>
	<description>Coding Friends, place for developers.</description>
	<lastBuildDate>Sun, 04 Dec 2011 21:11:08 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Box model</title>
		<link>http://www.codingfriends.com/index.php/2010/01/26/box-model/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=box-model</link>
		<comments>http://www.codingfriends.com/index.php/2010/01/26/box-model/#comments</comments>
		<pubDate>Tue, 26 Jan 2010 11:17:52 +0000</pubDate>
		<dc:creator>genux</dc:creator>
				<category><![CDATA[HTML  & CSS]]></category>
		<category><![CDATA[Box model]]></category>

		<guid isPermaLink="false">http://www.codingfriends.com/?p=575</guid>
		<description><![CDATA[Introduction The box model within HTML is how the content and the area around it is defined. There is the content itself, paddings, border and margin&#8217;s. Each one can be altered and also each part of the top,bottom,left and right. Image of the box model Green : content Blue : padding red : border yellow [...]]]></description>
			<content:encoded><![CDATA[<h3>Introduction</h3>
<p>The box model within HTML is how the content and the area around it is defined.  There is the content itself, paddings, border and margin&#8217;s.  Each one can be altered and also each part of the top,bottom,left and right.</p>
<h3>Image of the box model</h3>
<div id="attachment_576" class="wp-caption aligncenter" style="width: 486px"><a href="http://www.codingfriends.com/wp-content/uploads/2010/01/boxmodel.jpeg"><img src="http://www.codingfriends.com/wp-content/uploads/2010/01/boxmodel.jpeg" alt="box model in HTML" title="boxmodel" width="476" height="378" class="size-full wp-image-576" /></a><p class="wp-caption-text">box model in HTML</p></div>
<p>Green : content<br />
Blue  : padding<br />
red : border<br />
yellow : margin</p>
<h3>How to alter the each aspect of the model</h3>
<p>To alter the margin for example you just need to define the actual HTML object that you want to &#8220;talk&#8221; to, so lets define that first.</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;div id=&quot;alterhere&quot;&gt;
hi there this is the content
&lt;/div&gt;</pre></div></div>

<p>and then to talk to the HTML object you just select it ( if was a class then you use &#8220;.&#8221; or if it was a id then use &#8220;#&#8221;, the way that I remember is that &#8220;.&#8221; is like class method call in c++/java/c# etc and &#8220;#&#8221; is what you could call a variable).</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #cc00cc;">#alterhere</span> 
<span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">margin</span> <span style="color: #00AA00;">:</span> <span style="color: #933;">20px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>means to have a full margin of 20px (pixels) but to pull out just the left part to be bigger then</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #cc00cc;">#alterhere</span>
<span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">margin-left</span> <span style="color: #00AA00;">:</span> <span style="color: #933;">50px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>so the margin left will now be 50px instead of 20px.  You can do the same for padding as well, padding-left, padding-right, padding-top, padding-bottom.</p>
<h3>Conclusion</h3>
<p>The box model is very nice and also allows you to fully control the content and the box around it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.codingfriends.com/index.php/2010/01/26/box-model/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

