<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>CSS Positioning: Margin, Border, and Padding</title><link>http://blogs.msdn.com/petel/archive/2006/05/15/598491.aspx</link><description>UPDATE: After reading this post, read the important addendum I added with the post titled DOCType? Why do I need that? I've always had an issue with trying to remember in which order the margin, border, and padding items filled in an element in HTML and</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>re: CSS Positioning: Margin, Border, and Padding</title><link>http://blogs.msdn.com/petel/archive/2006/05/15/598491.aspx#598739</link><pubDate>Tue, 16 May 2006 11:59:59 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:598739</guid><dc:creator>wwfDev</dc:creator><description>Hi,&lt;br&gt;&lt;br&gt;Nice sample, never too much on CSS! &lt;br&gt;&lt;br&gt;But isn't the padding area included in the width-value? It seems so from your 2 first samples (the Lorem Ipsum ones). In the starting sample, the colored one, the width is said to apply to the content area only (not including the padding area), but the text (content) as displayed in your samples are surely not the same width.&lt;br&gt;&lt;br&gt;I'm not sure but this may also apply to the border (that the width covers the whole thing except margins)?</description></item><item><title>re: CSS Positioning: Margin, Border, and Padding</title><link>http://blogs.msdn.com/petel/archive/2006/05/15/598491.aspx#598747</link><pubDate>Tue, 16 May 2006 12:27:56 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:598747</guid><dc:creator>Toby</dc:creator><description>This is all very nice to know but I have a problem regarding this. IE and FF renders theese boxes differently. Specifically the one with both width and padding set.&lt;br&gt;Does anyone have any good ideas as to how you should do a cross browser version of this simple thing?&lt;br&gt;I want to be able to have a fixed outer width and use internal padding as it works in IE.</description></item><item><title>re: CSS Positioning: Margin, Border, and Padding</title><link>http://blogs.msdn.com/petel/archive/2006/05/15/598491.aspx#598955</link><pubDate>Tue, 16 May 2006 18:07:34 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:598955</guid><dc:creator>Richard M Mathis</dc:creator><description>I've wanted to create something like the above for my techs for a while, just had never gotten around to it, so I'm going to take advantage of this and forward it on to them. :)&lt;br&gt;&lt;br&gt;Something in CSS I always had an issue remembering was the order of setting different values for Margin, padding, etc. &amp;nbsp;Example, if I wanted to do 10 pixels on the top, 5 pixels on the right and left, and 15 pixels on the bottom, I would usually do the longer margin-top: 10px, margin-right: 5px;, margin-left: 5px; and margin-bottom: 15px;&lt;br&gt;...&lt;br&gt;&lt;br&gt;Until I realized it was done clockwise! &amp;nbsp;so a more concise version would be: Margin: 10px 5px 15px 5px (top, right, bottom, left), now I just visualize a clock and its simple. :)&lt;br&gt;&lt;br&gt;&lt;br&gt;</description></item><item><title>re: CSS Positioning: Margin, Border, and Padding</title><link>http://blogs.msdn.com/petel/archive/2006/05/15/598491.aspx#599539</link><pubDate>Wed, 17 May 2006 06:28:44 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:599539</guid><dc:creator>Jeremy H.</dc:creator><description>The IE hack that I use to because IE 6 or lower and FF (or Safari) render the sizes differently is like this...
&lt;br&gt;
&lt;br&gt;#myDiv
&lt;br&gt;{
&lt;br&gt; &amp;nbsp; &amp;nbsp;width: 100; /*IE Width, this is the entire width you want */
&lt;br&gt; &amp;nbsp; &amp;nbsp;padding: 0px 20px 0px 20px;
&lt;br&gt;}
&lt;br&gt;
&lt;br&gt;html&amp;gt;body #myDiv
&lt;br&gt;{
&lt;br&gt; &amp;nbsp; &amp;nbsp;width: 60px /* width minus border, padding, margins */
&lt;br&gt;}</description></item><item><title>re: CSS Positioning: Margin, Border, and Padding</title><link>http://blogs.msdn.com/petel/archive/2006/05/15/598491.aspx#600809</link><pubDate>Thu, 18 May 2006 12:13:10 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:600809</guid><dc:creator>Nick G</dc:creator><description>VERY misleading article with incorrect explanations and demonstrations.
&lt;br&gt;
&lt;br&gt;For a start, it hasn't even got a valid doctype specified, so the browsers are rendering in Quirks mode which is why none of the examples work properly. In fact the examples demonstrate the bugs in the ancient IE6 - and render differently in WORKING browsers such as Firefox, Safari and IE7.
&lt;br&gt;
&lt;br&gt;This article should be pulled before it confuses any more people.</description></item><item><title>css positioning with margins</title><link>http://blogs.msdn.com/petel/archive/2006/05/15/598491.aspx#8804196</link><pubDate>Sat, 02 Aug 2008 07:13:23 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8804196</guid><dc:creator>css positioning with margins</dc:creator><description>&lt;p&gt;PingBack from &lt;a rel="nofollow" target="_new" href="http://gia.freepicturenews.info/csspositioningwithmargins.html"&gt;http://gia.freepicturenews.info/csspositioningwithmargins.html&lt;/a&gt;&lt;/p&gt;
</description></item><item><title>css positioning with margins</title><link>http://blogs.msdn.com/petel/archive/2006/05/15/598491.aspx#8804202</link><pubDate>Sat, 02 Aug 2008 07:15:36 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8804202</guid><dc:creator>css positioning with margins</dc:creator><description>&lt;p&gt;PingBack from &lt;a rel="nofollow" target="_new" href="http://laurel.freevideonewsradio.info/csspositioningwithmargins.html"&gt;http://laurel.freevideonewsradio.info/csspositioningwithmargins.html&lt;/a&gt;&lt;/p&gt;
</description></item></channel></rss>