<?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>Consilience Media &#187; Styling</title>
	<atom:link href="http://www.consil.co.uk/blog/category/webinterface/styling/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.consil.co.uk</link>
	<description></description>
	<lastBuildDate>Thu, 12 Jan 2012 12:03:04 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>Accessible font sizes</title>
		<link>http://www.consil.co.uk/blog/2008/12/29/font-sizes/</link>
		<comments>http://www.consil.co.uk/blog/2008/12/29/font-sizes/#comments</comments>
		<pubDate>Mon, 29 Dec 2008 10:06:59 +0000</pubDate>
		<dc:creator>Phill Brown</dc:creator>
				<category><![CDATA[Styling]]></category>
		<category><![CDATA[accessibility]]></category>
		<category><![CDATA[Chrome]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[font size]]></category>
		<category><![CDATA[monospace]]></category>
		<category><![CDATA[Safari]]></category>

		<guid isPermaLink="false">http://www.consil.co.uk/blog/?p=288</guid>
		<description><![CDATA[A quick note to developers that are styling elements that use monospace fonts (pre, code, q, etc). Be aware that some browsers, like Safari and Chrome, have their own fixed-width font size preference, which by default is set to 13px. This upsets proceedings when you apply a proportional (% or em) font-size to the body. There are three solutions to counter this problem: Apply font-size to each element separately Remove monospace from the font stack and treat it as a <a href="http://www.consil.co.uk/blog/2008/12/29/font-sizes/" title="Read more" class="sprite-wrapper arrow-green-right">...<span class="sprite"></span></a>]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-full wp-image-296" src="http://www.consil.co.uk/files/2008/12/font-sizes-29dec081.jpg" alt="font-sizes-29dec081" width="200" height="200" />A quick note to developers that are styling elements that use monospace fonts (pre, code, q, etc). Be aware that some browsers, like Safari and Chrome, have their own fixed-width font size preference, which by default is set to 13px. This upsets proceedings when you apply a proportional (% or em) font-size to the body.</p>
<p>There are three solutions to counter this problem:</p>
<ol>
<li>Apply font-size to each element separately</li>
<li>Remove monospace from the font stack and treat it as a variable spaced font</li>
<li>Use a fixed font size</li>
</ol>
<p>Firefox and Internet Explorer have a single default font size so you can&#8217;t apply a larger size to monospace elements.</p>
<p>On the same subject, Google Chrome users can also set different default sizes for their serif and sans-serif fonts. By default these are identical so it will not affect the styling for the majority of users.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.consil.co.uk/blog/2008/12/29/font-sizes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Menu Challenges 2</title>
		<link>http://www.consil.co.uk/blog/2008/08/26/menu-challenges-2/</link>
		<comments>http://www.consil.co.uk/blog/2008/08/26/menu-challenges-2/#comments</comments>
		<pubDate>Tue, 26 Aug 2008 20:59:14 +0000</pubDate>
		<dc:creator>Phill Brown</dc:creator>
				<category><![CDATA[Styling]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[IE6]]></category>
		<category><![CDATA[Internet Explorer]]></category>

		<guid isPermaLink="false">http://www.consil.co.uk/blog/?p=25</guid>
		<description><![CDATA[IE6 is broken. [sourcecode language="css"] #menu ul.level2 li { display: block; } #menu ul.level2 li a { display: block; float: none; border: 1px solid transparent; /* Stops the box from jittering on hover */ margin: 0.25em 0px; padding: 0.3em 0.6em; background: transparent; color: #666666; font-weight: normal; } #menu ul.level2 li a:hover { background: #f36e45 url(../images/menu-level2-bg-hover.gif) left top repeat-x; color: #ffffff; border: 1px solid #f2683d; -webkit-border-radius: 3px; -moz-border-radius: 3px; } [/sourcecode] 2 major problems. There is a large margin on the <a href="http://www.consil.co.uk/blog/2008/08/26/menu-challenges-2/" title="Read more" class="sprite-wrapper arrow-green-right">...<span class="sprite"></span></a>]]></description>
			<content:encoded><![CDATA[<p>IE6 is broken.</p>
<p>[sourcecode language="css"]</p>
<p>#menu ul.level2 li {<br />
display: block;<br />
}</p>
<p>#menu ul.level2 li a {<br />
display: block;<br />
float: none;<br />
border: 1px solid transparent; /* Stops the box from jittering on hover */<br />
margin: 0.25em 0px;<br />
padding: 0.3em 0.6em;<br />
background: transparent;<br />
color: #666666;<br />
font-weight: normal;<br />
}</p>
<p>#menu ul.level2 li a:hover {<br />
background: #f36e45 url(../images/menu-level2-bg-hover.gif) left top repeat-x;<br />
color: #ffffff;<br />
border: 1px solid #f2683d;<br />
-webkit-border-radius: 3px;<br />
-moz-border-radius: 3px;<br />
}</p>
<p>[/sourcecode]</p>
<p>2 major problems. There is a large margin on the bottom of my list items, and there is a funny dark grey border around each list item. So why these 2 bugs?</p>
<h4>Grey Border</h4>
<p>The grey border is caused by IE6&#8242;s failiure to render transparent borders. It instead falls back to the color property (which in this case is set to #666666).</p>
<p>This is the first place on my site where I need to render something differently in IE6 to other browsers. There are 2 ways of doing this:</p>
<ol>
<li>Use the famous &#8216;* html&#8217; hack. IE has a mysterious wrapper around the html tag (god only knows why!).</li>
<li>Include another stylesheet for IE6</li>
</ol>
<p>For a site of this size, the sensible option was to include a separate stylesheet for IE and below. The stylesheet should only render in IE5 and 6 because of the @import hack (hides the stylesheet from all v4 browsers):</p>
<p>[sourcecode language='html']</p>
<p><!--[if lt IE 7]&gt;--></p>
<p><!--[endif]--></p>
<p>[/sourcecode]</p>
<p>To fix the border, we set the border color to a color we&#8217;ll never use within the element or on any of it&#8217;s children &#8211; pink is usually a good bet. We then apply the Microsoft CSS filter property to that color to make it transparent.</p>
<p>[sourcecode language='css']</p>
<p>#menu ul.level2 li a {<br />
border-color: pink;<br />
filter: chroma(color = pink);<br />
}</p>
<p>[/sourcecode] </p>
]]></content:encoded>
			<wfw:commentRss>http://www.consil.co.uk/blog/2008/08/26/menu-challenges-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Menu Challenges 1</title>
		<link>http://www.consil.co.uk/blog/2008/08/21/css-3/</link>
		<comments>http://www.consil.co.uk/blog/2008/08/21/css-3/#comments</comments>
		<pubDate>Thu, 21 Aug 2008 19:12:09 +0000</pubDate>
		<dc:creator>Phill Brown</dc:creator>
				<category><![CDATA[Styling]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[CSS Positioning]]></category>
		<category><![CDATA[CSS3]]></category>
		<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://www.consil.co.uk/blog/?p=22</guid>
		<description><![CDATA[Ok, so I&#8217;m getting into my site now. The wrapper is in place, and I&#8217;m moving on to the menu: As you can see, this isn&#8217;t your ordinary set of tabs and is causing a number of problems for browsers. Rounded Corners The problem with this menu is that it&#8217;s got a curved highlight hover. There are 4 different ways to curve boxes: 1. Nifty Corners: Uses JavaScript to insert &#60;b&#62; 1px in height and reducing in width. PROS: Scalable, <a href="http://www.consil.co.uk/blog/2008/08/21/css-3/" title="Read more" class="sprite-wrapper arrow-green-right">...<span class="sprite"></span></a>]]></description>
			<content:encoded><![CDATA[<p>Ok, so I&#8217;m getting into my site now. The wrapper is in place, and I&#8217;m moving on to the menu:</p>
<p>As you can see, this isn&#8217;t your ordinary set of tabs and is causing a number of problems for browsers.</p>
<h3>Rounded Corners</h3>
<p>The problem with this menu is that it&#8217;s got a curved highlight hover. There are 4 different ways to curve boxes:</p>
<h4>1. Nifty Corners:</h4>
<p>Uses JavaScript to insert &lt;b&gt; 1px in height and reducing in width.</p>
<p>PROS: Scalable, Works on all browsers<br />
CONS: Doesn&#8217;t support borders, Fixed Radius</p>
<h4>2. Background image</h4>
<p>Have a single fixed image appear in the background.</p>
<p>PROS: Fast loading speed, Works on all browsers, Supports borders, Flexible radius<br />
CONS: Isn&#8217;t scalable</p>
<h4>3. Positioned Spans</h4>
<p>Have 4 span blocks load up inside the list item. The blocks are given a background image and are then absolutely positioned into the 4 corners.</p>
<p>PROS: Scalable, Adjustable radius, Supports borders<br />
CONS: Slow loading speed, Doesn&#8217;t work well on IE6</p>
<h4>4. CSS 3</h4>
<p>Use the new CSS 3 rounded corner properties:</p>
<ul>
<li>-webkit-border-radius (safari)</li>
<li>-moz-border-radius (firefox 3)</li>
</ul>
<p>PROS: Fast loading speed, Scalable, Adjustable radius, Supports borders<br />
CONS: Doesn&#8217;t work on IE and old browsers</p>
<p>In the end I took the <strong>CSS 3</strong> option. The lack of curvy corners didn&#8217;t make it look dirty as it would on sites that are totally curvy.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.consil.co.uk/blog/2008/08/21/css-3/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

