<?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>www.nerdscene.com &#187; CSS</title>
	<atom:link href="http://www.nerdscene.com/tag/css/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.nerdscene.com</link>
	<description>bitching about everything, one post at a time...</description>
	<lastBuildDate>Tue, 06 Apr 2010 17:40:42 +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>Two of the most useful Web Developer sites ever</title>
		<link>http://www.nerdscene.com/2009/04/22/107/</link>
		<comments>http://www.nerdscene.com/2009/04/22/107/#comments</comments>
		<pubDate>Wed, 22 Apr 2009 15:03:37 +0000</pubDate>
		<dc:creator>Eli Sand</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Web Design]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Internet Explorer]]></category>
		<category><![CDATA[MSDN Library]]></category>
		<category><![CDATA[web browser]]></category>

		<guid isPermaLink="false">http://www.nerdscene.com/?p=107</guid>
		<description><![CDATA[If you do any sort of Web Development at all and you don&#8217;t know about either of these sites, you&#8217;re severely missing out on one of the Internets most useful resources ever created for Web Development. Sure, there are other sites, even Microsoft&#8217;s MSDN Library which has pretty good documentation on a lot of the [...]]]></description>
			<content:encoded><![CDATA[<p>If you do any sort of Web Development at all and you don&#8217;t know about either of these sites, you&#8217;re severely missing out on one of the Internets most useful resources ever created for Web Development.  Sure, there are other sites, even Microsoft&#8217;s MSDN Library which has pretty good documentation on a lot of the same stuff, but none are as easy to navigate and have as many tips and information about cross-browser application.</p>
<p>I&#8217;m talking of course about Brian Wilson&#8217;s <a title="Index DOT Html" href="http://www.blooberry.com/indexdot/html/index.html" target="_blank">Index DOT Html</a> and <a title="Index DOT Css" href="http://www.blooberry.com/indexdot/css/index.html" target="_blank">Index DOT Css</a> sites.  I have been using these sites over the past 8+ or so years as one of my primary resources when it comes to Web Development.  They document the majority of the HTML and CSS elements and properties, how they work and what browsers support them (and to what degree) &#8211; complete with browser specific tips and notes.<br />
<span id="more-107"></span><br />
The sites may not be up to date with Firefox 3 and Internet Explorer 7 or 8, but the information they provide is still very relevant and still very useful.  They&#8217;re always my first stop when I need to look up a particular HTML element or CSS property, and to be honest I don&#8217;t know where I would turn if they weren&#8217;t around for me to use.  I suppose I owe Brian Wilson an enormous thank you for all his hard work and dedication to the sites, and I&#8217;m pretty sure that there are many others out there who owe the same as well.</p>
<p>Brian, thank you for two of the most useful resources available on the Internet over the past decade or so.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nerdscene.com/2009/04/22/107/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cross-Browser inline-block without word spacing!</title>
		<link>http://www.nerdscene.com/2009/04/20/97/</link>
		<comments>http://www.nerdscene.com/2009/04/20/97/#comments</comments>
		<pubDate>Mon, 20 Apr 2009 20:26:32 +0000</pubDate>
		<dc:creator>Eli Sand</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Web Design]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[CSS hack]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[Internet Explorer]]></category>
		<category><![CDATA[quirks mode]]></category>

		<guid isPermaLink="false">http://www.nerdscene.com/?p=97</guid>
		<description><![CDATA[If you&#8217;re any sort of respectable web designer, you&#8217;ve obviously come across many situations when you&#8217;ve had to use divs as a sort of inline block and only wished that you could use display: inline-block to quite simply solve all your layout problems.  Instead though, we&#8217;ve had to resort to using float: left and then [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re any sort of respectable web designer, you&#8217;ve obviously come across many situations when you&#8217;ve had to use divs as a sort of inline block and only <em>wished</em> that you could use display: inline-block to quite simply solve all your layout problems.  Instead though, we&#8217;ve had to resort to using float: left and then inserting a float clearing div/br after all those floated divs.  Sure, it works but it&#8217;s not what we really want to end up doing (especially having to throw in extra html markup just for visual correctness).</p>
<p>Well, I&#8217;ve since run in to a situation that using float: left wasn&#8217;t working for me (try centering a set of divs that have float: left &#8211; it&#8217;s a pain!), so I had to find some kind of way to use inline-block.  Thankfully, Internet Explorer 8 and Firefox 3 support inline-block now, but we still have to deal with those hard-headed users that take forever (or never) to upgrade their browsers.  To accomodate Internet Explorer 7 and Firefox 2 we have to use some CSS hacks (what else is new!); thankfully they&#8217;re not that bad (but it still invalidates your CSS&#8230; bummer).<br />
<span id="more-97"></span><br />
First, you must make sure that you do <em>not</em> throw the browser in to quirks mode, otherwise it won&#8217;t work just right.  This means specifying a proper DOCTYPE on your document (and if you&#8217;re using XHTML, don&#8217;t include the &lt;?xml &#8230; ?&gt; tag at the top).  Once you have that out of the way, it&#8217;s just a little bit of CSS to add to the element(s) you want to display as inline-block:</p>
<p><code><br />
display: -moz-inline-box;<br />
display: inline-block;<br />
zoom: 1;<br />
*display: inline;<br />
vertical-align: top;<br />
</code></p>
<p>The first line sets a special Firefox property that we need for Firefox 2.  The second line obviously sets the display to inline-block (and Firefox 2 will ignore this setting since it doesn&#8217;t understand inline-block).  The third sets an IE-only property called zoom to a default 1 (no zoom) which triggers a switch in Internet Explorer 7 to enable hasLayout which allows the divs (which are block elements by default) to inherit inline display features.  The fourth line re-sets the display to inline for Internet Explorer 7 to get the final effect we&#8217;re looking for.  The last line fixes part of the word spacing problem we&#8217;re about to mention below.</p>
<p>As mentioned, there&#8217;s still one small problem which you may notice &#8211; inline items get word spacing applied to them because they&#8217;re now inline elements.  That means that <em>any</em> space between your div tags will show up in your layout (even newlines!).  If you&#8217;re trying to get your div blocks to sit side by side without any spacing, you&#8217;re probably pulling your hair out because of this spacing.  There&#8217;s two fixes for it &#8211; the first is to simply get rid of it, though this usually means killing any readability in your back-end programming (if any is used) and mushing all your HTML code together in to one long line which sucks too.  The second way to fix it is with a bit more CSS around the container in which all these divs are in:</p>
<p><code><br />
word-spacing: -1em;<br />
</code></p>
<p>That line of CSS sets the word-spacing to -1em, which is like doing a backspace of 1 character to get rid of the blank space caused by any white space or newlines between your divs.  The vertical-align: top CSS we already added to the individual divs gets rid of the spacing between the divs above and below, but it doesn&#8217;t fix the spacing to the left or right.  By adding a negative word-spacing, we get rid of the spacing on either side of our divs which gets rid of the last of our problems.</p>
<p>There you have it &#8211; a cross-browser inline-block CSS solution, and even a fix for any erroneous spaces in your HTML markup that you probably won&#8217;t want either.  I haven&#8217;t tested these fixes in Internet Explorer 6 for a few reasons; I refuse to code for Internet Explorer 6 any more since the browser is so old and Internet Explorer 8 is now officially released so users <em>really</em> should upgrade.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nerdscene.com/2009/04/20/97/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

