<?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>CSS Tutorials and CSS Articles &#187; CSS Display</title>
	<atom:link href="http://www.cssmaster.co.uk/tag/css-display/feed" rel="self" type="application/rss+xml" />
	<link>http://www.cssmaster.co.uk</link>
	<description>CSS tutorials and articles</description>
	<lastBuildDate>Tue, 02 Feb 2010 01:43:09 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>CSS Display</title>
		<link>http://www.cssmaster.co.uk/css-display</link>
		<comments>http://www.cssmaster.co.uk/css-display#comments</comments>
		<pubDate>Mon, 18 Jan 2010 11:23:21 +0000</pubDate>
		<dc:creator>CSS Master</dc:creator>
				<category><![CDATA[CSS Tutorials]]></category>
		<category><![CDATA[CSS Display]]></category>

		<guid isPermaLink="false">http://www.cssmaster.co.uk/?p=60</guid>
		<description><![CDATA[There are different ways you can display or hide an element using CSS Display and CSS Visibility.   Let&#8217;s begin at the ways we can hide an element.
visibility:hidden; this declaration will hide the element from the users screen, but the page still acts as if it was there.  So, if you have a [...]]]></description>
			<content:encoded><![CDATA[<p>There are different ways you can display or hide an element using <strong>CSS Display</strong> and <strong>CSS Visibility</strong>.   Let&#8217;s begin at the ways we can hide an element.</p>
<p><code>visibility:hidden;</code> this declaration will hide the element from the users screen, but the page still acts as if it was there.  So, if you have a div that is 500&#215;500px, and you use <code>visibility:hidden;</code> the contents (and background) of that div will not show, but there will be a large whitespace instead.</p>
<p><code>display:none;</code> is similar to <code>visibility:hidden;</code> in that the element cannot be seen, but instead of just showing a whitespace the element is totally removed.  It is as though the element is not even there.</p>
<p>There are three modes of displaying elements on-screen.  The first is <code>display:inline;</code>, this makes the element continue with the flow of the page.  A good way of explaining this is with a flow of text.  Let&#8217;s a assume you have a paragraph of 3,000 lines, on line 500 you have an inline element that just makes it&#8217;s content text red, this text will flow with the rest of the content.  Now let&#8217;s imagine that same element was <code>display:block;</code>, the red text would begin on it&#8217;s own line, and the remainder of the original div would then start on it&#8217;s own line.  Some good examples of block elements are divs, h1 (h2, h3, &#8230;), p.  Some examples of inline elements are span and a.</p>
<p>There is an in-between declaration of <code>display:inline-block;</code>, which allows a block element to appear in the flow of the text.  Block elements can be styled more solidly than inline elements; so let&#8217;s say you have styled your a tag with display:block; with some other attributes to make it look like a button.  If you want this button to follow the flow of text then <code>display:inline-block;</code> is the ideal solution.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cssmaster.co.uk/css-display/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

