<?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>DEfusion.org.uk &#187; CSS</title>
	<atom:link href="http://www.defusion.org.uk/archives/category/web-development/css/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.defusion.org.uk</link>
	<description>I too will force my opinions on you</description>
	<lastBuildDate>Mon, 04 Jul 2011 19:28:08 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>CSS Management on Large Sites</title>
		<link>http://www.defusion.org.uk/archives/2008/10/21/css-management-on-large-sites/</link>
		<comments>http://www.defusion.org.uk/archives/2008/10/21/css-management-on-large-sites/#comments</comments>
		<pubDate>Tue, 21 Oct 2008 19:06:18 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Outer Monologue]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.defusion.org.uk/archives/2008/10/21/css-management-on-large-sites/</guid>
		<description><![CDATA[At one of my previous jobs we had a massive amount of CSS to handle; we had the global styles, then section/page specific styles and on top of both of those we had different styles for various versions of the application (as the same application and content ran many sites).
The solution we came up with [...]]]></description>
			<content:encoded><![CDATA[<p>At one of my previous jobs we had a massive amount of <acronym title="Cascading Style Sheets">CSS</acronym> to handle; we had the global styles, then section/page specific styles and on top of both of those we had different styles for various versions of the application (as the same application and content ran many sites).</p>
<p>The solution we came up with was not too dissimilar to the one discussed in this months <a href="http://www.alistapart.com/">A List Apart</a> article <a href="http://www.alistapart.com/articles/progressiveenhancementwithcss">Progressive Enhancement with <acronym title="Cascading Style Sheets">CSS</acronym></a> and that article is well worth a read. But I also thought I&#8217;d write a little about the setup that we came up with and how it worked out for us.<br />
<span id="more-184"></span><br />
The basic setup was as follows:</p>
<ul>
<li>Split the styles into their three components of the <acronym title="Cascading Style Sheets">CSS</acronym> make-up: layout, typography, skin (with the skin file containing the colour and graphics). As this kept things nicely compartmentalised and meant that we could re-use some styles from one site (e.g. the layout generally was the same for most content across all the sites) while applying extra changes specific to that site.</li>
<li>The stylesheets were organised into directories based on the section (or sometimes specific page) of the application. So for example <span class="code">home/layout.css</span>, <span class="code">home/skin.css</span>, <span class="code">news/layout.css</span> and <span class="code">news/skin.css</span> etc.</li>
<li>We could then also import specific stylesheets for each of our sites on top of these (both at a global and section level) which usually just overrode a few style declarations to keep these site-specific style rules to a minimum.</li>
<li>All of this was managed server side using a configuration schema which knew where to look for the stylesheets for a given section of the application (as well as the global ones) and include them as appropriate for the given site.</li>
</ul>
<p>We also had common comment styling for breaking the larger stylesheets into sections (which makes it easier to find things) and tried to alphabetise our properties within each style rule (although it&#8217;s not something that I personally could always stick to).</p>
<p>This was quite a good system, it may have looked complex based on the number of stylesheets that were imported for any given page but it worked out really well and we never really had any problems with our <acronym title="Cascading Style Sheets">CSS</acronym> system.</p>
<p>I&#8217;ve even used it on a few of my own larger side projects with minor tweaking to the system (e.g. dropping the configuration schema and following a Rails-like &quot;Convention over Configuration&quot; setup), and as I say it is very similar to the one described in the <a href="http://www.alistapart.com/">A List Apart</a> article <a href="http://www.alistapart.com/articles/progressiveenhancementwithcss">Progressive Enhancement with <acronym title="Cascading Style Sheets">CSS</acronym></a> &#8212; that has a really good idea for handling the different media types, which we handled via our schema.</p>]]></content:encoded>
			<wfw:commentRss>http://www.defusion.org.uk/archives/2008/10/21/css-management-on-large-sites/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Quick Link: Speed up your web application with an automated caching system for assets</title>
		<link>http://www.defusion.org.uk/archives/2008/01/08/quick-link-speed-up-your-web-application-with-an-automated-caching-system-for-assets/</link>
		<comments>http://www.defusion.org.uk/archives/2008/01/08/quick-link-speed-up-your-web-application-with-an-automated-caching-system-for-assets/#comments</comments>
		<pubDate>Tue, 08 Jan 2008 18:11:34 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.defusion.org.uk/archives/2008/01/08/quick-link-speed-up-your-web-application-with-an-automated-caching-system-for-assets/</guid>
		<description><![CDATA[I&#8217;ve just read this interesting post on how to speed up your web application with an automated system for working with browsers cache for your assets (CSS, JavaScript, images etc.).
Previously I&#8217;ve used query strings parameters within asset requests so that they act as a &#8216;cache bust&#8217; parameter, these have usually been the source control revision [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve just read this <a href="http://particletree.com/notebook/automatically-version-your-css-and-javascript-files/">interesting post</a> on how to speed up your web application with an automated system for working with browsers cache for your assets (<acronym title="Cascading Style Sheets">CSS</acronym>, JavaScript, images etc.).</p>
<p>Previously I&#8217;ve used query strings parameters within asset requests so that they act as a &#8216;cache bust&#8217; parameter, these have usually been the source control revision number and is built into the release process. But I&#8217;ve never taken the step of force an expiry date on content that can be cached and <a href="http://particletree.com/notebook/automatically-version-your-css-and-javascript-files/">the solution in the post</a> is a lot more fine grained than my previous solutions. Something to consider for the future.</p>]]></content:encoded>
			<wfw:commentRss>http://www.defusion.org.uk/archives/2008/01/08/quick-link-speed-up-your-web-application-with-an-automated-caching-system-for-assets/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>(Not) Styling Form Controls</title>
		<link>http://www.defusion.org.uk/archives/2007/05/25/not-styling-form-controls/</link>
		<comments>http://www.defusion.org.uk/archives/2007/05/25/not-styling-form-controls/#comments</comments>
		<pubDate>Fri, 25 May 2007 09:27:20 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
				<category><![CDATA[Accessibility]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Outer Monologue]]></category>
		<category><![CDATA[Standards]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.defusion.org.uk/archives/2007/05/25/not-styling-form-controls/</guid>
		<description><![CDATA[I decided quite a while ago, probably about 18 months ago, that I wasn&#8217;t going to attempt to style form controls any more. 
This was based on my personal experience and my personal preference &#8211; I think your average user appreciates being able to easily identify a text box, a form button etc. &#8211; as [...]]]></description>
			<content:encoded><![CDATA[<p>I decided quite a while ago, probably about 18 months ago, that I wasn&#8217;t going to attempt to style form controls any more. </p>
<p>This was based on my personal experience and my personal preference &#8211; I think your average user appreciates being able to easily identify a text box, a form button etc. &#8211; as forms can be confronting beasts to some people. If you leave all the form controls in their default style in the users chosen browser then at least they can readily and quickly identify and understand them.<br />
<span id="more-124"></span><br />
This is always something that the designer in me (and designers and other colleagues I work with) naturally (and usually subconsciously, on my part) fight. Quite often I end up styling form controls (buttons especially) in my design mock-ups and by that point it&#8217;s harder to let go of them.</p>
<p>I have in the past on numerous occasions thought &quot;I wish that all browsers would allow me to do whatever I want with form controls&quot; but that thought soon passed when I thought about some of the hideous monstrosities that would allow people to create, I&#8217;d never even contemplated the why and how it would be implemented by the browser or in <acronym title="Cascading Style Sheets">CSS</acronym>. <a href="http://meyerweb.com/eric/">Eric Meyer</a>, on the other hand, <a href="http://meyerweb.com/eric/thoughts/2007/05/15/formal-weirdness/">has thought about it</a>.  It&#8217;s  a very long post but defiantly a worthwhile read if this is something you&#8217;ve ever had to face.</p>]]></content:encoded>
			<wfw:commentRss>http://www.defusion.org.uk/archives/2007/05/25/not-styling-form-controls/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Cross Brower Base Font Size, The Simple Way</title>
		<link>http://www.defusion.org.uk/archives/2007/04/17/cross-brower-base-font-size-the-simple-way/</link>
		<comments>http://www.defusion.org.uk/archives/2007/04/17/cross-brower-base-font-size-the-simple-way/#comments</comments>
		<pubDate>Tue, 17 Apr 2007 21:01:54 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.defusion.org.uk/archives/2007/04/17/cross-brower-base-font-size-the-simple-way/</guid>
		<description><![CDATA[Every time I start a new project I'm always trying to do things better than I did on the last project, it's the way for all developers.
One thing that has always bugged me is trying to get the base text size the same across all browsers, but now I've totally dropped the idea of supporting [...]]]></description>
			<content:encoded><![CDATA[<p>Every time I start a new project I'm always trying to do things better than I did on the last project, it's the way for all developers.</p>
<p>One thing that has always bugged me is trying to get the base text size the same across all browsers, but now I've totally dropped the idea of supporting <acronym title="Internet Explorer">IE</acronym> 5.5 ever again I thought it might be easier now.<br />
<span id="more-121"></span><br />
After a bit of searching I didn't really come up with any &quot;Eureka!&quot; posts where someone said &quot;This is the way to do it&quot;, but eventually I came across <a href="http://mi6.ais.ucla.edu/devbriefs/usable-cross-browser-font-sizing">a short post</a> which says that using one of the following 60, 69%, 76%, 83%, or 89% as the font-size on the <span class="code">body</span> should work out pretty well cross-browser.</p>
<p>The lack of a comment thread and the slightly strange site I found this on led me to investigate it further. So I made a test file with the following:</p>
<div class="igBar"><span id="lhtml-3"><a href="#" onclick="javascript:showPlainTxt('html-3'); return false;">Display code as plain text</a></span></div>
<div class="syntax_hilite"><span class="langName">HTML:</span>
<div id="html-3">
<div class="html">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">&lt;div</span></a> <span style="color: #000066;">style</span>=<span style="color: #ff0000;">"padding: 10px 0; background-color: #999;"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/div&gt;</span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">&lt;div</span></a> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">"testCol"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #009900;"><a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">&lt;div&gt;</span></a></span>Text in a DIV<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/div&gt;</span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #009900;"><a href="http://december.com/html/4/element/p.html"><span style="color: #000000; font-weight: bold;">&lt;p&gt;</span></a></span>Text in a P<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/p&gt;</span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #009900;"><a href="http://december.com/html/4/element/h1.html"><span style="color: #000000; font-weight: bold;">&lt;h1&gt;</span></a></span>H1<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/h1&gt;</span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #009900;"><a href="http://december.com/html/4/element/h2.html"><span style="color: #000000; font-weight: bold;">&lt;h2&gt;</span></a></span>H2<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/h2&gt;</span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #009900;"><a href="http://december.com/html/4/element/h3.html"><span style="color: #000000; font-weight: bold;">&lt;h3&gt;</span></a></span>H3<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/h3&gt;</span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #009900;"><a href="http://december.com/html/4/element/h4.html"><span style="color: #000000; font-weight: bold;">&lt;h4&gt;</span></a></span>H4<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/h4&gt;</span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #009900;"><a href="http://december.com/html/4/element/h5.html"><span style="color: #000000; font-weight: bold;">&lt;h5&gt;</span></a></span>H5<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/h5&gt;</span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #009900;"><a href="http://december.com/html/4/element/h6.html"><span style="color: #000000; font-weight: bold;">&lt;h6&gt;</span></a></span>H6<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/h6&gt;</span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #009900;"><a href="http://december.com/html/4/element/table.html"><span style="color: #000000; font-weight: bold;">&lt;table&gt;</span></a></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><a href="http://december.com/html/4/element/thead.html"><span style="color: #000000; font-weight: bold;">&lt;thead&gt;</span></a></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><a href="http://december.com/html/4/element/tr.html"><span style="color: #000000; font-weight: bold;">&lt;tr&gt;</span></a></span><span style="color: #009900;"><a href="http://december.com/html/4/element/th.html"><span style="color: #000000; font-weight: bold;">&lt;th&gt;</span></a></span>TH<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/th&gt;</span></span><span style="color: #009900;"><a href="http://december.com/html/4/element/th.html"><span style="color: #000000; font-weight: bold;">&lt;th&gt;</span></a></span>TH<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/th&gt;</span></span><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/tr&gt;</span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;</span></a>/thead&gt;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><a href="http://december.com/html/4/element/tbody.html"><span style="color: #000000; font-weight: bold;">&lt;tbody&gt;</span></a></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><a href="http://december.com/html/4/element/tr.html"><span style="color: #000000; font-weight: bold;">&lt;tr&gt;</span></a></span><span style="color: #009900;"><a href="http://december.com/html/4/element/th.html"><span style="color: #000000; font-weight: bold;">&lt;th&gt;</span></a></span>TH<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/th&gt;</span></span><span style="color: #009900;"><a href="http://december.com/html/4/element/td.html"><span style="color: #000000; font-weight: bold;">&lt;td&gt;</span></a></span>TD<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/td&gt;</span></span><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/tr&gt;</span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/tbody&gt;</span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/table&gt;</span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/div&gt;</span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">&lt;div</span></a> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">"sizeCol"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #009900;"><a href="http://december.com/html/4/element/p.html"><span style="color: #000000; font-weight: bold;">&lt;p</span></a> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">"p2"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span>2em<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/p&gt;</span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #009900;"><a href="http://december.com/html/4/element/p.html"><span style="color: #000000; font-weight: bold;">&lt;p</span></a> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">"p2_5"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span>2.5em<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/p&gt;</span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #009900;"><a href="http://december.com/html/4/element/p.html"><span style="color: #000000; font-weight: bold;">&lt;p</span></a> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">"p3"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span>3em<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/p&gt;</span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #009900;"><a href="http://december.com/html/4/element/p.html"><span style="color: #000000; font-weight: bold;">&lt;p</span></a> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">"p3_5"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span>3.5em<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/p&gt;</span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #009900;"><a href="http://december.com/html/4/element/p.html"><span style="color: #000000; font-weight: bold;">&lt;p</span></a> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">"p4"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span>4em<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/p&gt;</span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #009900;"><a href="http://december.com/html/4/element/p.html"><span style="color: #000000; font-weight: bold;">&lt;p</span></a> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">"p4_5"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span>4.5em<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/p&gt;</span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #009900;"><a href="http://december.com/html/4/element/p.html"><span style="color: #000000; font-weight: bold;">&lt;p</span></a> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">"p5"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span>5em<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/p&gt;</span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #009900;"><a href="http://december.com/html/4/element/p.html"><span style="color: #000000; font-weight: bold;">&lt;p</span></a> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">"p5_5"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span>5.5em<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/p&gt;</span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #009900;"><a href="http://december.com/html/4/element/p.html"><span style="color: #000000; font-weight: bold;">&lt;p</span></a> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">"p6"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span>6em<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/p&gt;</span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #009900;"><a href="http://december.com/html/4/element/p.html"><span style="color: #000000; font-weight: bold;">&lt;p</span></a> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">"p6_5"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span>6.5em<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/p&gt;</span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #009900;"><a href="http://december.com/html/4/element/p.html"><span style="color: #000000; font-weight: bold;">&lt;p</span></a> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">"p7"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span>7em<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/p&gt;</span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #009900;"><a href="http://december.com/html/4/element/p.html"><span style="color: #000000; font-weight: bold;">&lt;p</span></a> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">"p7_5"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span>7.5em<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/p&gt;</span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/div&gt;</span></span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>With the following styles applied:</p>
<div class="igBar"><span id="lcss-4"><a href="#" onclick="javascript:showPlainTxt('css-4'); return false;">Display code as plain text</a></span></div>
<div class="syntax_hilite"><span class="langName">CSS:</span>
<div id="css-4">
<div class="css">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">/* normalise browser stuff */</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><acronym title="HyperText Markup Language">HTML</acronym> * <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">margin</span>: <span style="color: #cc66cc;color:#800000;">0</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">padding</span>: <span style="color: #cc66cc;color:#800000;">0</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">/* normalise font size */</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">body <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">font-family</span>: <span style="color: #ff0000;">"Trebuchet <acronym title="Microsoft">MS</acronym>"</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">font-size</span>: <span style="color: #cc66cc;color:#800000;">83</span>%;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; line-<span style="color: #000000; font-weight: bold;">height</span>: <span style="color: #cc66cc;color:#800000;">1</span>.35em; <span style="color: #808080; font-style: italic;">/* it seems line-height is bigger on windows by default */</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">p <span style="color: #66cc66;">&#123;</span> <span style="color: #000000; font-weight: bold;">font-size</span>: 1em; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">h1 <span style="color: #66cc66;">&#123;</span> <span style="color: #000000; font-weight: bold;">font-size</span>: 2em; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">h2 <span style="color: #66cc66;">&#123;</span> <span style="color: #000000; font-weight: bold;">font-size</span>: <span style="color: #cc66cc;color:#800000;">1</span>.8em; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">h3 <span style="color: #66cc66;">&#123;</span> <span style="color: #000000; font-weight: bold;">font-size</span>: <span style="color: #cc66cc;color:#800000;">1</span>.6em; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">h4 <span style="color: #66cc66;">&#123;</span> <span style="color: #000000; font-weight: bold;">font-size</span>: <span style="color: #cc66cc;color:#800000;">1</span>.4em; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">h5 <span style="color: #66cc66;">&#123;</span> <span style="color: #000000; font-weight: bold;">font-size</span>: <span style="color: #cc66cc;color:#800000;">1</span>.2em; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">h6 <span style="color: #66cc66;">&#123;</span> <span style="color: #000000; font-weight: bold;">font-size</span>: 1em; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">#testCol,</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #cc00cc;">#sizeCol <span style="color: #66cc66;">&#123;</span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">float</span>: <span style="color: #000000; font-weight: bold;">left</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">margin-left</span>: 20px;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">display</span>: <span style="color: #993333;">inline</span>; <span style="color: #808080; font-style: italic;">/* fix <acronym title="Internet Explorer">IE</acronym> double float margin */</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #cc00cc;">#testCol <span style="color: #66cc66;">&#123;</span></span> <span style="color: #000000; font-weight: bold;">width</span>: 100px; <span style="color: #000000; font-weight: bold;">padding-left</span>: 20px; <span style="color: #000000; font-weight: bold;">border-left</span>: 1px <span style="color: #993333;">solid</span> #000; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #cc00cc;">#sizeCol <span style="color: #66cc66;">&#123;</span></span> <span style="color: #000000; font-weight: bold;">width</span>: 700px; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">#sizeCol p <span style="color: #66cc66;">&#123;</span> <span style="color: #000000; font-weight: bold;">float</span>: <span style="color: #000000; font-weight: bold;">left</span>; <span style="color: #000000; font-weight: bold;">width</span>: 350px; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #cc00cc;">#p2 <span style="color: #66cc66;">&#123;</span></span> <span style="color: #000000; font-weight: bold;">font-size</span>: 2em; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #cc00cc;">#p3 <span style="color: #66cc66;">&#123;</span></span> <span style="color: #000000; font-weight: bold;">font-size</span>: 3em; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #cc00cc;">#p4 <span style="color: #66cc66;">&#123;</span></span> <span style="color: #000000; font-weight: bold;">font-size</span>: 4em; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #cc00cc;">#p5 <span style="color: #66cc66;">&#123;</span></span> <span style="color: #000000; font-weight: bold;">font-size</span>: 5em; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #cc00cc;">#p6 <span style="color: #66cc66;">&#123;</span></span> <span style="color: #000000; font-weight: bold;">font-size</span>: 6em; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #cc00cc;">#p7 <span style="color: #66cc66;">&#123;</span></span> <span style="color: #000000; font-weight: bold;">font-size</span>: 7em; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">#p2_5 <span style="color: #66cc66;">&#123;</span> <span style="color: #000000; font-weight: bold;">font-size</span>: <span style="color: #cc66cc;color:#800000;">2</span>.5em; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">#p3_5 <span style="color: #66cc66;">&#123;</span> <span style="color: #000000; font-weight: bold;">font-size</span>: <span style="color: #cc66cc;color:#800000;">3</span>.5em; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">#p4_5 <span style="color: #66cc66;">&#123;</span> <span style="color: #000000; font-weight: bold;">font-size</span>: <span style="color: #cc66cc;color:#800000;">4</span>.5em; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">#p5_5 <span style="color: #66cc66;">&#123;</span> <span style="color: #000000; font-weight: bold;">font-size</span>: <span style="color: #cc66cc;color:#800000;">5</span>.5em; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">#p6_5 <span style="color: #66cc66;">&#123;</span> <span style="color: #000000; font-weight: bold;">font-size</span>: <span style="color: #cc66cc;color:#800000;">6</span>.5em; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">#p7_5 <span style="color: #66cc66;">&#123;</span> <span style="color: #000000; font-weight: bold;">font-size</span>: <span style="color: #cc66cc;color:#800000;">7</span>.5em; <span style="color: #66cc66;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Then proceeded to do a bit of browser testing, and by god it works pretty much perfectly. I tested in <acronym title="Internet Explorer">IE</acronym> 6, <acronym title="Internet Explorer">IE</acronym> 7, Firefox 2 (PC &amp; Mac), Opera 9 (PC &amp; Mac), Safari 2 and Camino 1 and the <a href="/demos/070417/fontTestResults.htm">results</a> are very consistent.</p>
<p><strong>Note:</strong> <em>The important stuff where all the magic lives is those first 2 lines on the body selector</em> the line-height stuff was my addition - I noticed that it appeared to be quite different on the PC compared to the Mac (in my tests anyway).</p>
<p>So I have to thank Carl Uebelhart for the slightly strange post that opened up this lovely simplistic <acronym title="Cascading Style Sheets">CSS</acronym>.</p>
<p>Again, if you're interested I have <a href="/demos/070417/fontTestResults.htm">posted a slide show gallery of the results</a> in all the browsers mentioned for reference.</p>]]></content:encoded>
			<wfw:commentRss>http://www.defusion.org.uk/archives/2007/04/17/cross-brower-base-font-size-the-simple-way/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>When overflow: hidden Doesn&#8217;t Hide in IE</title>
		<link>http://www.defusion.org.uk/archives/2007/04/02/when-overflow-hidden-doesnt-hide-in-ie/</link>
		<comments>http://www.defusion.org.uk/archives/2007/04/02/when-overflow-hidden-doesnt-hide-in-ie/#comments</comments>
		<pubDate>Mon, 02 Apr 2007 23:08:37 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.defusion.org.uk/archives/2007/04/02/when-overflow-hidden-doesnt-hide-in-ie/</guid>
		<description><![CDATA[I've come across this problem before, where I want to hide the overflow of an element, this works fine in all browsers except IE - however it's never been a problem in anything that I've progressed far enough with to worry about fixing it for IE.
Well this evening I came across the problem again, and [...]]]></description>
			<content:encoded><![CDATA[<p>I've come across this problem before, where I want to hide the overflow of an element, this works fine in all browsers except <acronym title="Internet Explorer">IE</acronym> - however it's never been a problem in anything that I've progressed far enough with to worry about fixing it for <acronym title="Internet Explorer">IE</acronym>.</p>
<p>Well this evening I came across the problem again, and found the solution - <acronym title="Internet Explorer">IE</acronym> (I'm just looking at 6 here - not sure if 7 does the same) doesn't like it when you have a <span class="code">position: relative;</span> on the child (or possibly children) of an element which you have declared <span class="code">overflow: hidden;</span>. </p>
<p>So in my case swapping that out for <span class="code">position: absolute;</span> on the child and <span class="code">overflow: hidden; position: relative;</span> on the parent worked a charm.  Now <acronym title="Internet Explorer">IE</acronym> 6 plays nicely like its other browser friends.</p>]]></content:encoded>
			<wfw:commentRss>http://www.defusion.org.uk/archives/2007/04/02/when-overflow-hidden-doesnt-hide-in-ie/feed/</wfw:commentRss>
		<slash:comments>42</slash:comments>
		</item>
		<item>
		<title>The Future Could Be So Bright</title>
		<link>http://www.defusion.org.uk/archives/2006/03/11/the-future-could-be-so-bright/</link>
		<comments>http://www.defusion.org.uk/archives/2006/03/11/the-future-could-be-so-bright/#comments</comments>
		<pubDate>Sat, 11 Mar 2006 13:02:01 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.defusion.org.uk/archives/2006/03/11/the-future-could-be-so-bright/</guid>
		<description><![CDATA[Last weekend I spent about 25 hours developing a prototype for a meeting we had with a potential client on the Monday. We started with a blank page at 9:00 a.m. on Saturday morning and by 10:00 p.m. Sunday we had a pretty much fully functioning prototype which had a great design (in my opinion) [...]]]></description>
			<content:encoded><![CDATA[<p>Last weekend I spent about 25 hours developing a prototype for a meeting we had with a potential client on the Monday. We started with a blank page at 9:00 a.m. on Saturday morning and by 10:00 p.m. Sunday we had a pretty much fully functioning prototype which had a great design (in my opinion) and all the functionality that we intended to demonstrate.<span id="more-40"></span></p>
<p>While developing this prototype I only concentrated on making it work within Firefox, as that was our demonstration platform. Usually when developing, especially with <acronym title="eXtensible HyperText Markup Language - HTML reformulated as XML">XHTML</acronym> and <acronym title="Cascading Style Sheets">CSS</acronym>, I can see the areas that will be a problem in other browsers and apply hacks at the time. Not having to do this made the entire development so much easier, I concentrated on developing with standards in mind and with <a title="Prototype" href="http://prototype.conio.net">Prototype</a> &#038; <a href="http://script.aculo.us/">Script.aculo.us</a> for the JavaScript I could be certain that the results in the browser were exactly what I intended when I refreshed.</p>
<p>At the end of the development when I was handing it over to the person who was to do the presentation I explained how much easier it was to not have to worry about hacking around to fix issues in certain browsers, at which point he asked what it would look like in Internet Explorer. I hadn't checked as there was no need to, so I fired it up out of curiosity and even I was shocked by the mangled results; everything was wrong, some parts were missing completely.</p>
<p>My friend remarked "I didn't know you had to do so much to make it work in <acronym title="Internet Explorer">IE</acronym>" and that sad part was that neither did I, it had become second nature to me to spot the majority of these issues in the code and fix them as I'm going along.</p>
<p>Sure I know how to fix most of the issues that I saw in front of me, but I also know that some of the more major ones may have the potential to make me swear at the monitor for a couple of hours.</p>
<p>So I got a glimpse of the future purely by accident and I don't want to go back, I want that future to be now. From now on I would add the increased speed of development, flexibility and satisfaction (that you actually do know what you're doing when all these separate area of code are brought together in a browser and work exactly as expected) to <a href="http://www.456bereastreet.com/archive/200512/ten_reasons_to_learn_and_use_web_standards/">any</a> <a href="http://www.7nights.com/dkrprod/gwt_eight.php">list</a> of <a href="http://webstandards.org/about/">reasons</a> to use web standards.</p>
<p>I look forward to a <a title="IE 7 Beta Mix 06, can it bring us closer to web standards across all browsers?" href="http://www.molly.com/2006/03/01/microsoft-ie7-progress-sneak-preview-of-mix06-release/">brighter future</a> and only hope that it will be upon us soon.</p>]]></content:encoded>
			<wfw:commentRss>http://www.defusion.org.uk/archives/2006/03/11/the-future-could-be-so-bright/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Large Curly Quotes Without Images</title>
		<link>http://www.defusion.org.uk/archives/2005/12/24/large-curly-quotes-without-images/</link>
		<comments>http://www.defusion.org.uk/archives/2005/12/24/large-curly-quotes-without-images/#comments</comments>
		<pubDate>Sat, 24 Dec 2005 17:33:04 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.defusion.org.uk/?p=32</guid>
		<description><![CDATA[I've been reading the 24 ways to impress your friends web developer tips on the run up to Christmas and the 21st article, Swooshy Curly Quotes Without Images, was quite timely for me as it is an effect I was going to include in my current project.
At first it looked quite promising, but upon experimentation [...]]]></description>
			<content:encoded><![CDATA[<p>I've been reading the <a href="http://24ways.org/">24 ways to impress your friends</a> web developer tips on the run up to Christmas and the 21st article, <a href="http://24ways.org/advent/swooshy-curly-quotes-without-images">Swooshy Curly Quotes Without Images</a>, was quite timely for me as it is an effect I was going to include in my current project.</p>
<p>At first it looked quite promising, but upon experimentation it proved, for me at least, to be a little bit hit and miss to get it right in all browsers, and I must admit I gave up trying to tweak the margins and paddings quite quickly. But I liked the idea of not having to resort to using images for the large quotes, as I have done on previous attempts and began adding my own thoughts to the mix.<br />
<span id="more-32"></span><br />
As simon stated:</p>
<blockquote><p>I must admit that the heights, margins and spacing donâ€™t make a lot of sense if you analyze them. This was a real trial and error job. Get it working on Safari, and <acronym title="Internet Explorer">IE</acronym> would fail. Sort <acronym title="Internet Explorer">IE</acronym>, and Firefox would go weird.</p></blockquote>
<p>My aim was to get the same effect, but with slightly clearer rules affecting the position of the quotation marks. My solution is not quite as clean as the original in the markup (added one span) and requires a little more <accronym title="Cascading Style Sheets"><acronym title="Cascading Style Sheets">CSS</acronym></accronym> with some specific targeting of <acronym title="Internet Explorer">IE</acronym>. However I believe that the <acronym title="Cascading Style Sheets">CSS</acronym> rules and their roles in my solution are clearer to understand and thus change to reproduce the effect accordingly.</p>
<p>For the eager among you <a href="/demos/051224/blockquotes.htm">check out the demo page</a> for the final results, then read how I executed it.</p>
<h4>First the markup:</h4>
<div class="igBar"><span id="lhtml-8"><a href="#" onclick="javascript:showPlainTxt('html-8'); return false;">Display code as plain text</a></span></div>
<div class="syntax_hilite"><span class="langName">HTML:</span>
<div id="html-8">
<div class="html">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/pre.html"><span style="color: #000000; font-weight: bold;">&lt;pre</span></a> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">"code"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/blockquote.html"><span style="color: #000000; font-weight: bold;">&lt;blockquote&gt;</span></a></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #009900;"><a href="http://december.com/html/4/element/span.html"><span style="color: #000000; font-weight: bold;">&lt;span</span></a> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">"bqstart"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span><span style="color: #ddbb00;">&amp;#8220;</span><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/span&gt;</span></span>I'm a blockquote and I'm loving the big curly quotes I have.<span style="color: #009900;"><a href="http://december.com/html/4/element/span.html"><span style="color: #000000; font-weight: bold;">&lt;span&gt;</span></a></span><span style="color: #ddbb00;">&amp;nbsp;</span><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/span&gt;</span></span><span style="color: #009900;"><a href="http://december.com/html/4/element/span.html"><span style="color: #000000; font-weight: bold;">&lt;span</span></a> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">"bqend"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span><span style="color: #ddbb00;">&amp;#8221;</span><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/span&gt;</span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/blockquote&gt;</span></span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>The only addition here is the span before the closing quotation mark, which contains a single non-breaking space character.</p>
<h4>The <acronym title="Cascading Style Sheets">CSS</acronym></h4>
<div class="igBar"><span id="lcss-9"><a href="#" onclick="javascript:showPlainTxt('css-9'); return false;">Display code as plain text</a></span></div>
<div class="syntax_hilite"><span class="langName">CSS:</span>
<div id="css-9">
<div class="css">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">blockquote <span style="color: #66cc66;">&#123;</span> </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">position</span>: <span style="color: #993333;">relative</span>; </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">text-indent</span>: 2em;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">.bqstart,</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #6666ff;">.bqend </span><span style="color: #66cc66;">&#123;</span> <span style="color: #000000; font-weight: bold;">font-size</span>: <span style="color: #cc66cc;color:#800000;">300</span>%; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #6666ff;">.bqstart </span><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">text-indent</span>: <span style="color: #cc66cc;color:#800000;">0</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">position</span>: <span style="color: #993333;">absolute</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">top</span>: -<span style="color: #cc66cc;color:#800000;">0</span>.2em;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">left</span>: <span style="color: #cc66cc;color:#800000;">0</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #6666ff;">.bqend </span><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">position</span>: <span style="color: #993333;">absolute</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">margin-top</span>: -<span style="color: #cc66cc;color:#800000;">0</span>.2em;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">right</span>: <span style="color: #cc66cc;color:#800000;">0</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">text-indent</span>: <span style="color: #cc66cc;color:#800000;">0</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>What this does is:</p>
<ul>
<li>For all browsers we are positioning the quotation mark span elements absolutely to the relatively positioned blockquote.</li>
<li>For the opening quotation mark we fiddle with the top positioning value to ensure the quotation mark appears where we want.</li>
<li>For the closing quotation mark we apply a negative top margin to make it appear in line with the text, note that this has the same value as the top positioning applied to the opening quotation mark.</li>
<li>To ensure that the quotation marks don't appear over the text itself a text indent is applied, which is removed from the quotation marks themselves. This is the reason for the extra span, to create the space for the final quotation mark.</li>
</ul>
<p>The only values that need tweaking, to account for the size of the quotes for your given font family or the chosen scale of the quotes themselves, are the text-indent, top positioning and negative margin (remember these two have the same value). </p>
<p>This is enough for all browsers except <acronym title="Internet Explorer">IE</acronym> to which we have to apply some extra rules. These additions mean we end up with the following as our final CSS:</p>
<div class="igBar"><span id="lcss-10"><a href="#" onclick="javascript:showPlainTxt('css-10'); return false;">Display code as plain text</a></span></div>
<div class="syntax_hilite"><span class="langName">CSS:</span>
<div id="css-10">
<div class="css">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">blockquote <span style="color: #66cc66;">&#123;</span> </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">position</span>: <span style="color: #993333;">relative</span>; </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">text-indent</span>: 2em;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">.bqstart,</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #6666ff;">.bqend </span><span style="color: #66cc66;">&#123;</span> <span style="color: #000000; font-weight: bold;">font-size</span>: <span style="color: #cc66cc;color:#800000;">300</span>%; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">/* apply <acronym title="Internet Explorer">IE</acronym> specific rules first */</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #6666ff;">.bqstart </span><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">text-indent</span>: <span style="color: #cc66cc;color:#800000;">0</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">margin</span>: -<span style="color: #cc66cc;color:#800000;">0</span><span style="color: #6666ff;">.6em </span><span style="color: #cc66cc;color:#800000;">0</span> -2em <span style="color: #cc66cc;color:#800000;">0</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">float</span>: <span style="color: #000000; font-weight: bold;">left</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">blockquote&gt; <span style="color: #6666ff;">.bqstart </span><span style="color: #66cc66;">&#123;</span> </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #808080; font-style: italic;">/* add extra non-<acronym title="Internet Explorer">IE</acronym> rules */</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">position</span>: <span style="color: #993333;">absolute</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">top</span>: -<span style="color: #cc66cc;color:#800000;">0</span>.2em;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">left</span>: <span style="color: #cc66cc;color:#800000;">0</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #808080; font-style: italic;">/* remove <acronym title="Internet Explorer">IE</acronym> specific rules */</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">float</span>: <span style="color: #993333;">none</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">margin</span>: <span style="color: #cc66cc;color:#800000;">0</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #6666ff;">.bqend </span><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">position</span>: <span style="color: #993333;">absolute</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">margin-top</span>: -<span style="color: #cc66cc;color:#800000;">0</span>.6em;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">right</span>: <span style="color: #cc66cc;color:#800000;">0</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">text-indent</span>: <span style="color: #cc66cc;color:#800000;">0</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">blockquote&gt; <span style="color: #6666ff;">.bqend </span><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">margin-top</span>: -<span style="color: #cc66cc;color:#800000;">0</span>.2em;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>The absolute positioning method was producing widely different results on the opening quote in each version of <acronym title="Internet Explorer">IE</acronym> on the PC, it even removed the text-indent in <acronym title="Internet Explorer">IE</acronym> 5.5 - which re-appeared when the following solution was applied. </p>
<p>So I returned to <a href="http://24ways.org/advent/swooshy-curly-quotes-without-images">Simon's solution</a> to fix this. In this case as we're only dealing with one family of browsers, and thankfully the results are the same in all three versions of <acronym title="Internet Explorer">IE</acronym> on the PC, we only have to apply values to the top and bottom margins for <acronym title="Internet Explorer">IE</acronym>.</p>
<p>These <acronym title="Internet Explorer">IE</acronym> specific rules are then over-ridden using the child selector, so every other browser gets the original <acronym title="Cascading Style Sheets">CSS</acronym> in the cascade.</p>
<p>The closing quotation mark was, thankfully, appearing in the same place in all three versions of <acronym title="Internet Explorer">IE</acronym> and in pretty much the same place as every other browser, so it was simply a matter of increasing the size of the negative top margin, note that this is again the same value applied to the opening quotation mark. If you're not a perfectionist you could even get away with accounting for this tiny difference without loosing any sleep.</p>
<p><a href="/demos/051224/blockquotes.htm">See the demo page for the final results</a>.</p>
<h4>Browser Support</h4>
<p><strong>Tested with:</strong><br />
PC : Firefox 1.5, Opera 8.5, NS 7.1, <acronym title="Internet Explorer">IE</acronym> 5, 5.5, 6<br />
Mac : Safari 2.0, Firefox 1.5 </p>
<p><strong>Notes:</strong> </p>
<ul>
<li><em>Firefox 1.5 on the Mac only</em> the closing quotation mark overlaps the text where the last line is full width. This is because the text-indent is not been applied to the span that contains the &amp;nbsp; and I can't seem to make it apply it.</li>
<li>In the demo when I added a background color the opening quotation mark disappeared in <acronym title="Internet Explorer">IE</acronym> 5.5 and <acronym title="Internet Explorer">IE</acronym> 6.0, this was solved by adding the ever useful <acronym title="Internet Explorer">IE</acronym> <acronym title="Cascading Style Sheets">CSS</acronym> bug fixer known <span class="code">position: relative;</span>.</li>
</ul>
<p><del>I've not had chance to test it on a Mac yet, but when I do I'll post the results.</del> <em>Update:</em> I've just tested on the Mac and have added the browsers above, I must also apologise to my Safari visitors as I noticed a bug with the code example areas - which I've now fixed.</p>
<p>Something a little weird is going on here for me, <acronym title="Internet Explorer">IE</acronym> 5.0 is applying the rules within the child selector, I'm pretty sure that it shouldn't but can't explain why it is.  Anyhow if this is a common occurrence the absolute positioning solution it ends up applying seems to work fine (go figure).</p>]]></content:encoded>
			<wfw:commentRss>http://www.defusion.org.uk/archives/2005/12/24/large-curly-quotes-without-images/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Vertical Aligning in CSS</title>
		<link>http://www.defusion.org.uk/archives/2005/11/12/vertical-aligning-in-css/</link>
		<comments>http://www.defusion.org.uk/archives/2005/11/12/vertical-aligning-in-css/#comments</comments>
		<pubDate>Sat, 12 Nov 2005 14:59:26 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.defusion.org.uk/?p=17</guid>
		<description><![CDATA[I'm in the midst of resurrecting another of my old sites in which I'm using the old design but bringing the HTML &#038; CSS up to scratch.
The design calls for the site to be a 760 x 420 pixel container centered both horizontally and vertically within the navigator.

As anyone who has tried this will know, [...]]]></description>
			<content:encoded><![CDATA[<p>I'm in the midst of resurrecting another of my old sites in which I'm using the old design but bringing the <acronym title="HyperText Markup Language">HTML</acronym> &#038; <acronym title="Cascading Style Sheets">CSS</acronym> up to scratch.</p>
<p>The design calls for the site to be a 760 x 420 pixel container centered both horizontally and vertically within the navigator.<br />
<span id="more-17"></span><br />
As anyone who has tried this will know, vertically aligning block level elements in <acronym title="Cascading Style Sheets">CSS</acronym> is not the easiest thing to achieve. It's something I've done a couple of times, but the technique(s) to achieve this always escape me and I spend 10 minutes searching for the most concise and compatible method. Today that search brought me to a <a href="http://tutorials.alsacreations.com/centrer/">page on Centering elements on a  <acronym title="Cascading Style Sheets">CSS</acronym> website</a>.</p>
<p>It almost worked perfectly out of the box, apparently <acronym title="Internet Explorer">IE</acronym> Mac doesn't like the negative vertical margin.</p>
<p>The solution I have, which relies on the the <a href="http://www.stopdesign.com/log/2004/07/06/filtering-css.html"><acronym title="Internet Explorer">IE</acronym> Mac <acronym title="Cascading Style Sheets">CSS</acronym> Filter</a> to simply remove the negative vertical margin, is:</p>
<div class="igBar"><span id="lcss-12"><a href="#" onclick="javascript:showPlainTxt('css-12'); return false;">Display code as plain text</a></span></div>
<div class="syntax_hilite"><span class="langName">CSS:</span>
<div id="css-12">
<div class="css">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #cc00cc;">#outerContentWrap <span style="color: #66cc66;">&#123;</span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">width</span>: 760px;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">height</span>: 420px;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">position</span>:<span style="color: #993333;">absolute</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">left</span>: <span style="color: #cc66cc;color:#800000;">50</span>%; </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">top</span>: <span style="color: #cc66cc;color:#800000;">50</span>%;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">margin-top</span>: -210px; <span style="color: #808080; font-style: italic;">/* half of the height */</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">margin-left</span>: -380px; <span style="color: #808080; font-style: italic;">/* half of the width */</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">/* (x) remove negative vertical margin for <acronym title="Internet Explorer">IE</acronym> Mac (apparently it doesn't like it) */</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">/*\*/</span><span style="color: #808080; font-style: italic;">/*/</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">#outerContentWrap { margin-top: 0px; }</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">/**/</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>It is untested on <acronym title="Internet Explorer">IE</acronym> Mac, but it should work. I understand the <a href="http://blogs.msdn.com/ie/archive/2005/10/12/480242.aspx">current discussions on the use of hacks</a> especially those to do with fixing things in <acronym title="Internet Explorer">IE</acronym>, but I'm not 100% convinced yet, I see them as necessary for <acronym title="Internet Explorer">IE</acronym> 6 and below &amp; <acronym title="Internet Explorer">IE</acronym> Mac and I don't really like the kludginess of conditional comments, but I digress, it works for me.</p>]]></content:encoded>
			<wfw:commentRss>http://www.defusion.org.uk/archives/2005/11/12/vertical-aligning-in-css/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

