<?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>SRJM.co.uk &#187; CSS</title>
	<atom:link href="http://www.srjm.co.uk/journal/tagged/css/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.srjm.co.uk</link>
	<description>The online journal of digital artist and web designer Simon R.J. Mutton.</description>
	<lastBuildDate>Fri, 09 Jul 2010 20:56:23 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>HTML and CSS Fluid Transparent Rounded Corner Boxes</title>
		<link>http://www.srjm.co.uk/journal/2010/05/html-and-css-fluid-transparent-rounded-corner-boxes/</link>
		<comments>http://www.srjm.co.uk/journal/2010/05/html-and-css-fluid-transparent-rounded-corner-boxes/#comments</comments>
		<pubDate>Sun, 02 May 2010 21:47:29 +0000</pubDate>
		<dc:creator>Simon</dc:creator>
				<category><![CDATA[Web Design]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[Website Design]]></category>
		<category><![CDATA[XHTML]]></category>

		<guid isPermaLink="false">http://www.srjm.co.uk/?p=893</guid>
		<description><![CDATA[<p>That's quite a lot to demand of a title, and a box on a website as well it seems. In my work I have had a couple of designs lately that have required me to think up a good and solid way of having four rounded corners in a box that is one of a couple of things: </p>
<ul><li>Totally fluid, as in it resizes in both axes in accordance with changing content size.</li><li>Each corner needs actual transparency to sit on gradient backgrounds.</li></ul>
<p>So what to do about the boxes having exhausted quite an extensive Google search and not finding a method that really suited me? Make one up of course.</p>
<p class="alignCentre"><img src="http://www.srjm.co.uk/images/rounded-corner-box-example.png" alt="Rounded corner CSS and XHTML box example" /></p>]]></description>
			<content:encoded><![CDATA[<p><strong>That&#8217;s quite a lot to demand of a title, and a box on a website as well it seems. In my work I have had a couple of designs lately that have required me to think up a good and solid way of having four rounded corners in a box that is one of a couple of things: </strong></p>
<ul>
<li>Totally fluid, as in it resizes in both axes in accordance with changing content size.</li>
<li>Each corner needs actual transparency to sit on gradient backgrounds.</li>
</ul>
<p>There are hundreds of methods posted online about how to do fancy corners on boxes using <abbr title="Cascading Style Sheets">CSS</abbr>, but quite a lot of them just don&#8217;t have transparency involved, or worse still use a hack here and there or use a sprinkling of absolutely positioned, empty divs.</p>
<p><img class="floatRight" src="http://www.srjm.co.uk/images/rounded-corner-box-example2.png" alt="Fluid rounded corner box example image" /></p>
<p><strong>So what to do about the boxes having exhausted quite an extensive Google search and not finding a method that really suited me? Make one up of course.</strong> For those of us still stuck supporting <abbr title="Internet Explorer 6">IE6</abbr> as well as a raft of other browsers and their various editions, while offering a text resizing facility on the site, this meant it has to be remarkably robust.</p>
<p>The following method is the one I made for four corners only, with no border fanciness. In fact the graphical requirements were so simple that actually all the corners are the same GIF file as a ball, used much like you would a sprite: <img src="http://www.srjm.co.uk/images/corners.gif" alt="GIF corner sprite" /></p>
<p><span id="more-893"></span><code>/* White boxes */<br />
div.box {<br />
<span class="oneTab">width: 100%;</span><br />
<span class="oneTab">margin: 0 0 10px 0;</span><br />
<span class="oneTab">overflow: hidden;</span><br />
<span class="oneTab">background: url(../images/common/corners.gif) no-repeat top left;</span><br />
}<br />
div.box div {background: url(../images/common/corners.gif) no-repeat top right;}<br />
div.box div div {background-position: bottom left;}<br />
div.box div div div {<br />
<span class="oneTab">background-position: bottom right;</span><br />
<span class="oneTab">padding: 6px 0;</span><br />
}<br />
div.box div div div div {<br />
<span class="oneTab">padding: 0;</span><br />
<span class="oneTab">background: #fff none;</span><br />
<span class="oneTab">position: relative;</span><br />
}<br />
div.box div div div div div {<br />
<span class="oneTab">margin: 0 8px;</span><br />
<span class="oneTab">top: -6px;</span><br />
}<br />
div.box div div div div div div {<br />
<span class="oneTab">margin: 0;</span><br />
<span class="oneTab">top: 12px;</span><br />
}<br />
div.box div div div div div div div {<br />
<span class="oneTab">top: -6px;</span><br />
<span class="oneTab">overflow: auto;</span><br />
<span class="oneTab">background: none;</span><br />
<span class="oneTab">width: 100%;</span><br />
}<br />
div.box div div div div div div div div {<br />
<span class="oneTab">top: 0;</span><br />
<span class="oneTab">width: auto;</span><br />
<span class="oneTab">padding: 0;</span><br />
}</code></p>
<p><strong>And then the XHTML:</strong></p>
<p><code>&lt;div class=&quot;box&quot;&gt;&lt;div&gt;&lt;div&gt;&lt;div&gt;&lt;div&gt;&lt;div&gt;&lt;div&gt;&lt;div&gt;<br />
<span class="oneTab">&lt;strong&gt;Some sample content&lt;br /&gt;&lt;br /&gt;</span><br />
<span class="oneTab">Additional lines.&lt;/strong&gt;</span><br />
&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</code></p>
<p><strong>Resulting in something like this:</strong></p>
<p class="alignCentre"><img src="http://www.srjm.co.uk/images/rounded-corner-box-example.png" alt="Rounded corner CSS and XHTML box example" /></p>
<p>Because I haven&#8217;t used floats or any form of containment yet this box will just happily expand to fill the width it is in, and will grow with the content inside it just like a div tag ought to. However you might like to float the outer div or give it a width in EM or percent to make use of this fluid-ness. It can be easily adapted and expanded for many cornered box purposes, since with a bit of additional markup I made one with a solid rounded corner border all the way around.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.srjm.co.uk/journal/2010/05/html-and-css-fluid-transparent-rounded-corner-boxes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New Site, Old Browser</title>
		<link>http://www.srjm.co.uk/journal/2009/09/new-site-old-browser/</link>
		<comments>http://www.srjm.co.uk/journal/2009/09/new-site-old-browser/#comments</comments>
		<pubDate>Wed, 30 Sep 2009 07:57:55 +0000</pubDate>
		<dc:creator>Simon</dc:creator>
				<category><![CDATA[Web Design]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Website Design]]></category>

		<guid isPermaLink="false">http://www.srjm.co.uk/?p=698</guid>
		<description><![CDATA[<p>Even though I started this new design with the feeling that I should just ignore Internet Explorer 6, I did realise that there were still visitors doomed to using this browser, either because of their hardware/operating system limitation, familiarity or their company's refusal to update. I also had all the bits and pieces for adapting a site for 5 and 6 compatibility already in place, and had been adding them as and when I recognised old scenarios that needed them.</p>
<p>So I took this opportunity to start up my old computer, which is running a pretty much clean install of Windows 98 updated as far as it was supported, all on a Pentium 4 with 512mb of RAM and the high-end Geforce 2 <abbr title="Graphical Processing Unit: the main processing chip on a graphics card.">GPU</abbr>: astronomical power compared to what 95 and 98 were intended to work with normally. And then there is Internet Explorer 6! </p>]]></description>
			<content:encoded><![CDATA[<p>Even though I started this new design with the feeling that I should just ignore Internet Explorer 6, I did realise that there were still visitors doomed to using this browser, either because of their hardware/operating system limitation, familiarity or their company&#8217;s refusal to update. I also had all the bits and pieces for adapting a site for 5 and 6 compatibility already in place, and had been adding them as and when I recognised old scenarios that needed them.</p>
<p>So I took this opportunity to start up my old computer, which is running a pretty much clean install of Windows 98 updated as far as it was supported, all on a Pentium 4 with 512mb of RAM and the high-end Geforce 2 <abbr title="Graphical Processing Unit: the main processing chip on a graphics card.">GPU</abbr>: astronomical power compared to what 95 and 98 were intended to work with normally. And then there is Internet Explorer 6! </p>
<p>I was a little bit astonished to discover that despite my fears that the new CSS would collapse in a heap, everything was generally rendering exactly where it was meant to be. The only issues were superficial ones, such as transparent PNGs rendering as grey which were easily fixed. In the end I did make an effort to ensure that users browsing with <abbr title="Internet Explorer 6">IE6</abbr> do have a reasonable experience.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.srjm.co.uk/journal/2009/09/new-site-old-browser/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Personal CV Website</title>
		<link>http://www.srjm.co.uk/journal/2008/06/personal-cv-website/</link>
		<comments>http://www.srjm.co.uk/journal/2008/06/personal-cv-website/#comments</comments>
		<pubDate>Sat, 28 Jun 2008 09:13:43 +0000</pubDate>
		<dc:creator>Simon</dc:creator>
				<category><![CDATA[Work Placement]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Freelance]]></category>
		<category><![CDATA[Screenshots]]></category>
		<category><![CDATA[Vector]]></category>
		<category><![CDATA[Website Design]]></category>

		<guid isPermaLink="false">http://www.srjm.co.uk/?p=105</guid>
		<description><![CDATA[I have started work on a new design for http://www.mattwreford.com/, the owner of which felt that his existing site wasn&#8217;t really up to scratch. Knowing only that the client likes very simple and minimal designs, here is a screenshot of my initial layout and general concept for the site. It will be quite a simple [...]]]></description>
			<content:encoded><![CDATA[<p>I have started work on a new design for http://www.mattwreford.com/, the owner of which felt that his existing site wasn&#8217;t really up to scratch. Knowing only that the client likes very simple and minimal designs, here is a screenshot of my initial layout and general concept for the site.</p>
<p class="alignCentre"><img src="http://www.srjm.co.uk/images/matt-wreford-initial.jpg" title="" /></p>
<p>It will be quite a simple structure of 5 pages (four plus a link to a CV download) as requested, tabbed, and with two main content columns that serve different purposes on each page. For the CSS aspect of this design I have experimented with fluid column widths on both sides, where the content is grouped clearly in two blocks but they centre and expand within their columns with the resizing of the page.</p>
<p><span id="more-105"></span></p>
<h4>Tabs</h4>
<p>Here is a screenshot of the site&#8217;s tabs I have been drawing out in their original vector format.</p>
<p class="alignCentre"><img src="http://www.srjm.co.uk/images/tabs.png" title="" /></p>
<p>Naturally they will feature three states, an active tab that merges with the current page, an inactive tab and a highlighted inactive tab when a user moves their mouse over it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.srjm.co.uk/journal/2008/06/personal-cv-website/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Website Design Inspiration</title>
		<link>http://www.srjm.co.uk/journal/2008/02/website-design-inspiration/</link>
		<comments>http://www.srjm.co.uk/journal/2008/02/website-design-inspiration/#comments</comments>
		<pubDate>Tue, 12 Feb 2008 16:33:35 +0000</pubDate>
		<dc:creator>Simon</dc:creator>
				<category><![CDATA[General Stuff]]></category>
		<category><![CDATA[Work Placement]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Inspiration]]></category>
		<category><![CDATA[Links]]></category>
		<category><![CDATA[Website Design]]></category>

		<guid isPermaLink="false">http://srjm.co.uk/journal/2008/02/website-design-inspiration/</guid>
		<description><![CDATA[Because it is becoming a common occurence that I find a website that I find particularly inspirational, whether that be for its graphical design or a particular way of structuring what would normally be a very ordinary feature, and never really noting down the URL. Now I could tag these sites using del.icio.us under something [...]]]></description>
			<content:encoded><![CDATA[<p>
Because it is becoming a common occurence that I find a website that I find particularly inspirational, whether that be for its graphical design or a particular way of structuring what would normally be a very ordinary feature, and never really noting down the URL.
</p>
<p>Now I could tag these sites using del.icio.us under something like &#8216;inspiration&#8217; but I think I would rather also have more specific information or notes and possibly a screenshot to add some context.</p>
<p></p>
<p>
So I shall be <a href="http://srjm.co.uk/journal/inspiration/" title="Design Inspiration">recording these websites on a page here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.srjm.co.uk/journal/2008/02/website-design-inspiration/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Why does IE get PNG images quite so wrong?</title>
		<link>http://www.srjm.co.uk/journal/2007/11/why-does-ie-get-png-images-quite-so-wrong/</link>
		<comments>http://www.srjm.co.uk/journal/2007/11/why-does-ie-get-png-images-quite-so-wrong/#comments</comments>
		<pubDate>Mon, 26 Nov 2007 09:20:36 +0000</pubDate>
		<dc:creator>Simon</dc:creator>
				<category><![CDATA[General Stuff]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Website Design]]></category>

		<guid isPermaLink="false">http://srjm.co.uk/journal/2007/11/why-does-ie-get-png-images-quite-so-wrong/</guid>
		<description><![CDATA[Now I have avoided using transparent PNG for a long time despite its various advantages such as having a real alpha channel that can produce smooth, anti-aliased edges and having a proper amount of colours instead of 256, mainly because of IE6. But I have been testing for IE7 for a while now and I [...]]]></description>
			<content:encoded><![CDATA[<p>Now I have avoided using transparent PNG for a long time despite its various advantages such as having a real alpha channel that can produce smooth, anti-aliased edges and having a proper amount of colours instead of 256, mainly because of IE6. But I have been testing for IE7 for a while now and I knew the issue of PNGs and the handling of their transparency is supposed to be fixed so I reasoned that I could design with PNG transparency in mind and worry about fixing it for IE6 later.</p>
<p><span id="more-50"></span></p>
<p>So at the top of my page, an area that is pushing boundaries anyway by being dynamically resized via flash and javascript, I wanted a nice curved appearance instead of boxes, so that I could reveal more of my page&#8217;s background image. Below is a comparison between the way IE7 and Opera treats my curved transparent top (I&#8217;m afraid this might be difficult to see on some monitors with low contrast):</p>
<p><img src="http://www.srjm.co.uk/images/PNG-weirdness.jpg" alt="PNG graphic differences between Internet Explorer 7 and Opera" /></p>
<p>When I view it across my four test browsers, IE7 displays a significantly darker image than the others. But wait, this gets weirder. More annoyingly I find is that while IE7 was getting it noticeably wrong (#181818 as #111111), Opera, Safari and Firefox are also rendering the colour which should be #181818 as #171717, but this only becomes apparent when I take a screenshot of the page.</p>
<p><a href="http://www.pcmag.com/article2/0,1759,1645331,00.asp">Some information on PNG</a></p>
<p>I think I shall go back to designing without PNG transparency in mind.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.srjm.co.uk/journal/2007/11/why-does-ie-get-png-images-quite-so-wrong/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Annoying CSS</title>
		<link>http://www.srjm.co.uk/journal/2007/10/annoying-css/</link>
		<comments>http://www.srjm.co.uk/journal/2007/10/annoying-css/#comments</comments>
		<pubDate>Sun, 21 Oct 2007 11:09:24 +0000</pubDate>
		<dc:creator>Simon</dc:creator>
				<category><![CDATA[General Stuff]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Website Design]]></category>
		<category><![CDATA[XHTML]]></category>

		<guid isPermaLink="false">http://srjm.co.uk/journal/?p=43</guid>
		<description><![CDATA[Having completely exhausted a search for floating some images at the bottom right hand corner of a variably sized &#60;div&#62; and deciding this was impossible I came up with half a solution involving a normal float RIGHT &#60;div&#62; that cleared a second, hidden floating &#60;div&#62;, the height of which COULD have been determined by the [...]]]></description>
			<content:encoded><![CDATA[<p>
Having completely exhausted a search for floating some images at the bottom right hand corner of a variably sized <strong>&lt;div&gt;</strong> and deciding this was impossible I came up with half a solution involving a normal float RIGHT <strong>&lt;div&gt;</strong> that cleared a second, hidden floating <strong>&lt;div&gt;</strong>, the height of which COULD have been determined by the overall height of the containing <strong>&lt;div&gt;</strong>. But it wasn&#8217;t great, and text would wrap very poorly around the images, cutting into the padding and margins. Using EM on the buffer&#8217;s height meant I could make it vaguely change in line with textsize changes but generally it looked crap and was different in every browser.
</p>
<p><span id="more-43"></span></p>
<p>So instead I dropped that dream of two sets of images, one at the top left, the other at the bottom right and cheated and decided on using only the top left set, and a bottom right aligned background image to allude to the visual effect. Only I thought perhaps having a nice pyramidal effect would look good. And it should be easily achieved in CSS using a float and clear mechanism.</p>
<p><a href="http://www.srjm.co.uk/images/CSS.jpg"><br />
<img src="http://www.srjm.co.uk/images/CSS.jpg" alt="My floating css images rendered correctly in many browsers" width="381px" height="181px" /><br />
</a></p>
<p>Only Internet Explorer had different ideas. Above is how a lot of browsers rendered the floats, including Safari, Opera and Firefox. Below is how IE thinks it should look, so now I am left trying to find out a solution as to why only the images with the CLEAR parameter are being moved down and not the images following on. Something to do with displaying inline or block perhaps&#8230; If and when I find a solution I will update this.</p>
<p><a href="http://www.srjm.co.uk/images/CSS-bad.jpg"><br />
<img src="http://www.srjm.co.uk/images/CSS-bad.jpg" alt="Only the clear:left images being rendered a line down in Internet Explorer 7.0" width="381px" height="181px" /><br />
</a><br />
<a href="http://css-class.com/articles/explorer/floats/floatandcleartest1.htm">http://css-class.com/articles/explorer/floats/floatandcleartest1.htm</a></p>
<p><strong>Update:</strong></p>
<p>I have fixed this problem by using what I would consider a pretty brute-force method in the CSS world and that is using three specifically sized divs to create the text wrapping effect and then used position:absolute to place each image individually where I want it.</p>
<p>It looks exactly the same in all the browsers and now IE can join the club.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.srjm.co.uk/journal/2007/10/annoying-css/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

