<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: CSS: What&#039;s the difference</title>
	<atom:link href="http://www.scriptygoddess.com/archives/2004/03/31/css-whats-the-difference/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.scriptygoddess.com/archives/2004/03/31/css-whats-the-difference/</link>
	<description></description>
	<pubDate>Fri, 05 Dec 2008 02:59:26 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.3</generator>
		<item>
		<title>By: Code Novice</title>
		<link>http://www.scriptygoddess.com/archives/2004/03/31/css-whats-the-difference/#comment-11146</link>
		<dc:creator>Code Novice</dc:creator>
		<pubDate>Tue, 30 Nov 1999 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.scriptygoddess.com/archives/2004/03/31/css-whats-the-difference/#comment-11146</guid>
		<description>&lt;trackback /&gt;&lt;strong&gt;CSS Defs &#038; Lorem Ipsum&lt;/strong&gt;
Hey, who knew there was Imitate Jenni Week? ;) I...
</description>
		<content:encoded><![CDATA[<trackback /><strong>CSS Defs &#038; Lorem Ipsum</strong><br />
Hey, who knew there was Imitate Jenni Week? <img src='http://www.scriptygoddess.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> I&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Julik</title>
		<link>http://www.scriptygoddess.com/archives/2004/03/31/css-whats-the-difference/#comment-11145</link>
		<dc:creator>Julik</dc:creator>
		<pubDate>Tue, 30 Nov 1999 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.scriptygoddess.com/archives/2004/03/31/css-whats-the-difference/#comment-11145</guid>
		<description>To onderstand the difference between 'display:block' and 'display:inline' you have to know a few things.
Basically, HTML elements are divided into 'inline' and 'block' elements. Block elements include DIVs, lists, list items, paragraphs, headings, blockquotes etc.
If you put, say, 2 consecutive block elements in a page they will reside one UNDER each other (this is what happens if you put a few headings one after another. If you assign a border to them, you will see that they span from one side of the containing block (body is a block too BTW :) to the other. This is the behaviour for blocks.
Inline elements, in contrast, are positioned like words in a paragraph - one after the other, this is what happens if you put, say, 15 links one after the other in your code - they will follow each other and flow to the next line when there is little space.
The 'display' property allows you to override the default display of a particular element - for example, if you make the &#60;li&#62; tag inline - the list items will go one after the other like words in a paragraph.
And vice-versa - if you make the a tag block - it will occupy it's own line in your layout.
Overriding these properties is very useful for configuring custom backgrounds of elements (for example, left-padding property for an inline element gives you padding ONLY in the first line of this element, while padding-left on block element gives you padding for the whole box.</description>
		<content:encoded><![CDATA[<p>To onderstand the difference between &#039;display:block&#039; and &#039;display:inline&#039; you have to know a few things.<br />
Basically, HTML elements are divided into &#039;inline&#039; and &#039;block&#039; elements. Block elements include DIVs, lists, list items, paragraphs, headings, blockquotes etc.<br />
If you put, say, 2 consecutive block elements in a page they will reside one UNDER each other (this is what happens if you put a few headings one after another. If you assign a border to them, you will see that they span from one side of the containing block (body is a block too BTW <img src='http://www.scriptygoddess.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> to the other. This is the behaviour for blocks.<br />
Inline elements, in contrast, are positioned like words in a paragraph - one after the other, this is what happens if you put, say, 15 links one after the other in your code - they will follow each other and flow to the next line when there is little space.<br />
The &#039;display&#039; property allows you to override the default display of a particular element - for example, if you make the &lt;li&gt; tag inline - the list items will go one after the other like words in a paragraph.<br />
And vice-versa - if you make the a tag block - it will occupy it&#039;s own line in your layout.<br />
Overriding these properties is very useful for configuring custom backgrounds of elements (for example, left-padding property for an inline element gives you padding ONLY in the first line of this element, while padding-left on block element gives you padding for the whole box.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jesus Piña</title>
		<link>http://www.scriptygoddess.com/archives/2004/03/31/css-whats-the-difference/#comment-11143</link>
		<dc:creator>Jesus Piña</dc:creator>
		<pubDate>Tue, 30 Nov 1999 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.scriptygoddess.com/archives/2004/03/31/css-whats-the-difference/#comment-11143</guid>
		<description>Sorry I forgot to put the link.
http://brainjar.com/css/positioning/
Take a look at it and see what happens.</description>
		<content:encoded><![CDATA[<p>Sorry I forgot to put the link.<br />
<a href="http://brainjar.com/css/positioning/" rel="nofollow">http://brainjar.com/css/positioning/</a><br />
Take a look at it and see what happens.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sosa</title>
		<link>http://www.scriptygoddess.com/archives/2004/03/31/css-whats-the-difference/#comment-11144</link>
		<dc:creator>sosa</dc:creator>
		<pubDate>Tue, 30 Nov 1999 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.scriptygoddess.com/archives/2004/03/31/css-whats-the-difference/#comment-11144</guid>
		<description>i've found float position to be so much useful than absolute. But it can be so hard to understand in the first time. Floatutorial is an very good step-by-step resource for learning floats http://css.maxdesign.com.au/floatutorial/.
Also you could check Listamatic and Listutorial to see how can block and inline display property work in making unordered lists in navigation bars. :D</description>
		<content:encoded><![CDATA[<p>i&#039;ve found float position to be so much useful than absolute. But it can be so hard to understand in the first time. Floatutorial is an very good step-by-step resource for learning floats <a href="http://css.maxdesign.com.au/floatutorial/" rel="nofollow">http://css.maxdesign.com.au/floatutorial/</a>.<br />
Also you could check Listamatic and Listutorial to see how can block and inline display property work in making unordered lists in navigation bars. <img src='http://www.scriptygoddess.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jesus Piña</title>
		<link>http://www.scriptygoddess.com/archives/2004/03/31/css-whats-the-difference/#comment-11142</link>
		<dc:creator>Jesus Piña</dc:creator>
		<pubDate>Tue, 30 Nov 1999 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.scriptygoddess.com/archives/2004/03/31/css-whats-the-difference/#comment-11142</guid>
		<description>I was in the same predicament as you are and I found thsi tutorial about positioning that I think could be very helpful. In my opinion this the one tutorial that really gets me closer to understanding positioning. 
Just my 2 cents.</description>
		<content:encoded><![CDATA[<p>I was in the same predicament as you are and I found thsi tutorial about positioning that I think could be very helpful. In my opinion this the one tutorial that really gets me closer to understanding positioning.<br />
Just my 2 cents.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jennifer</title>
		<link>http://www.scriptygoddess.com/archives/2004/03/31/css-whats-the-difference/#comment-11141</link>
		<dc:creator>Jennifer</dc:creator>
		<pubDate>Tue, 30 Nov 1999 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.scriptygoddess.com/archives/2004/03/31/css-whats-the-difference/#comment-11141</guid>
		<description>One thing I noticed looking at some code - a useful display:inline; usage is on the form tag (depending on your layout) it's driven me crazy in some layouts that form is a block element...</description>
		<content:encoded><![CDATA[<p>One thing I noticed looking at some code - a useful display:inline; usage is on the form tag (depending on your layout) it&#039;s driven me crazy in some layouts that form is a block element&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Billy</title>
		<link>http://www.scriptygoddess.com/archives/2004/03/31/css-whats-the-difference/#comment-11140</link>
		<dc:creator>Billy</dc:creator>
		<pubDate>Tue, 30 Nov 1999 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.scriptygoddess.com/archives/2004/03/31/css-whats-the-difference/#comment-11140</guid>
		<description>A small point about relative positioning: In your example, your element will appear 320px from the left of the page, but there will still be a hole on the left side of your page where that element fits into the flow of the document.

Basically, a relatively positioned element is positioned statically first, then repositioned according to the rules in your CSS. But, this does not effect any other elements on the page. They stay exactly where they are.</description>
		<content:encoded><![CDATA[<p>A small point about relative positioning: In your example, your element will appear 320px from the left of the page, but there will still be a hole on the left side of your page where that element fits into the flow of the document.</p>
<p>Basically, a relatively positioned element is positioned statically first, then repositioned according to the rules in your CSS. But, this does not effect any other elements on the page. They stay exactly where they are.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vincent</title>
		<link>http://www.scriptygoddess.com/archives/2004/03/31/css-whats-the-difference/#comment-11139</link>
		<dc:creator>Vincent</dc:creator>
		<pubDate>Tue, 30 Nov 1999 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.scriptygoddess.com/archives/2004/03/31/css-whats-the-difference/#comment-11139</guid>
		<description>Other uses for inline:

You can make lists inline.  This can be useful in creating standard templates for pages, and then making the same code for your main menu either go down a left hand collum or across the top of the page.  

float:

I use float all the time for blocks.  Lets say you have 5 or 6 blocks of text (say, each of them have the last 5 posts in a particular category) if you float each one left (or right) then they'll fit as many as the can across the page, then move down below.  As the user resizes the page, they'll refloat.</description>
		<content:encoded><![CDATA[<p>Other uses for inline:</p>
<p>You can make lists inline.  This can be useful in creating standard templates for pages, and then making the same code for your main menu either go down a left hand collum or across the top of the page.  </p>
<p>float:</p>
<p>I use float all the time for blocks.  Lets say you have 5 or 6 blocks of text (say, each of them have the last 5 posts in a particular category) if you float each one left (or right) then they&#039;ll fit as many as the can across the page, then move down below.  As the user resizes the page, they&#039;ll refloat.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jayseae</title>
		<link>http://www.scriptygoddess.com/archives/2004/03/31/css-whats-the-difference/#comment-11138</link>
		<dc:creator>jayseae</dc:creator>
		<pubDate>Tue, 30 Nov 1999 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.scriptygoddess.com/archives/2004/03/31/css-whats-the-difference/#comment-11138</guid>
		<description>Your position stuff is just about right.  Personally, I don't think that I use any of them.

I also don't really use inline or block - but they can be useful.  Say you want to display a heading as the beginning of your paragraph - but then continue text as normal, instead of adding space around it.  Change your heading (say, &#60;h1&#62;) to display: inline, and it won't break when it hits it.  You could also use a span, styled with the right size information, to do this, and it might be more semantically correct - this is why I don't use the block/inline options.  But you can do it that way.

Contrary to the others, I find float very useful.  It allows you to "float" an element to the left or right of other elements.  Take a look at my page.  The main entires have a float (of left).  That means that it stays on the left side of the enclosing container, and other elements in the same container, like the sidebar, slides up next to it on the right.

Float indicates where the element ends up in the display - in this case, on the left of my page.

When you use float, make sure you pay attention to your widths.  For instance, if you have a page that is 800px wide, and a float: right element that is 300px wide, your remaining elements cannot be more than 500px (actually something like 490px is probably accurate, with padding and margins and borders) or it won't look like it floats.  The float moves an element to the side, and allows space for the other elements to move up the page next to it.  But if the other elements aren't wide enough, they won't.

The biggest problem with floats is that browsers support width differently - seems to mostly be because of margins and padding and such.  So make sure you test it!

Using borders helps, as it can display the border of each element, so you see exactly how the interact with one another.</description>
		<content:encoded><![CDATA[<p>Your position stuff is just about right.  Personally, I don&#039;t think that I use any of them.</p>
<p>I also don&#039;t really use inline or block - but they can be useful.  Say you want to display a heading as the beginning of your paragraph - but then continue text as normal, instead of adding space around it.  Change your heading (say, &lt;h1&gt;) to display: inline, and it won&#039;t break when it hits it.  You could also use a span, styled with the right size information, to do this, and it might be more semantically correct - this is why I don&#039;t use the block/inline options.  But you can do it that way.</p>
<p>Contrary to the others, I find float very useful.  It allows you to &#034;float&#034; an element to the left or right of other elements.  Take a look at my page.  The main entires have a float (of left).  That means that it stays on the left side of the enclosing container, and other elements in the same container, like the sidebar, slides up next to it on the right.</p>
<p>Float indicates where the element ends up in the display - in this case, on the left of my page.</p>
<p>When you use float, make sure you pay attention to your widths.  For instance, if you have a page that is 800px wide, and a float: right element that is 300px wide, your remaining elements cannot be more than 500px (actually something like 490px is probably accurate, with padding and margins and borders) or it won&#039;t look like it floats.  The float moves an element to the side, and allows space for the other elements to move up the page next to it.  But if the other elements aren&#039;t wide enough, they won&#039;t.</p>
<p>The biggest problem with floats is that browsers support width differently - seems to mostly be because of margins and padding and such.  So make sure you test it!</p>
<p>Using borders helps, as it can display the border of each element, so you see exactly how the interact with one another.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: wcoco</title>
		<link>http://www.scriptygoddess.com/archives/2004/03/31/css-whats-the-difference/#comment-11136</link>
		<dc:creator>wcoco</dc:creator>
		<pubDate>Tue, 30 Nov 1999 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.scriptygoddess.com/archives/2004/03/31/css-whats-the-difference/#comment-11136</guid>
		<description>I've been wanting to know this! There's *nowhere* i could find a proper explanation and not causing futher confusion! Thank you for this.</description>
		<content:encoded><![CDATA[<p>I&#039;ve been wanting to know this! There&#039;s *nowhere* i could find a proper explanation and not causing futher confusion! Thank you for this.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.353 seconds -->
