<?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>Paul Randall &#187; css</title>
	<atom:link href="https://paulrandall.com/tag/css/feed/" rel="self" type="application/rss+xml" />
	<link>https://paulrandall.com</link>
	<description>Experimenting for a living.</description>
	<lastBuildDate>Sat, 15 Mar 2025 15:32:49 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=4.1.41</generator>
	<item>
		<title>OOCSS</title>
		<link>https://paulrandall.com/2012/08/18/oocss/</link>
		<comments>https://paulrandall.com/2012/08/18/oocss/#comments</comments>
		<pubDate>Sat, 18 Aug 2012 14:17:38 +0000</pubDate>
		<dc:creator><![CDATA[Paul]]></dc:creator>
				<category><![CDATA[oocss]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[front-end]]></category>

		<guid isPermaLink="false">http://prandall.com/?p=614</guid>
		<description><![CDATA[I&#8217;ve been working with OOCSS on a few projects and I&#8217;ve been really impressed with the concept so far. For those who don&#8217;t know of the concept, OOCSS stands for Object Oriented CSS — @stubornella can explain it better than me on the GitHub repo: https://github.com/stubbornella/oocss/wiki I had previously considered this sort of approach to [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>I&#8217;ve been working with OOCSS on a few projects and I&#8217;ve been really impressed with the concept so far.</p>
<p>For those who don&#8217;t know of the concept, OOCSS stands for Object Oriented CSS — <a href="http://twitter.com/stubornella">@stubornella</a> can explain it better than me on the GitHub repo: <a href="https://github.com/stubbornella/oocss/wiki">https://github.com/stubbornella/oocss/wiki</a><span id="more-614"></span></p>
<p>I had previously considered this sort of approach to only be suitable for prototyping frameworks, such as Zurb Foundation. I was originally hesitant of the presentation naming of the classes (I was never a fan of presentational grids to begin with) but I have understood that this approach is much easier to understand when multiple people are working on a project, without any documentation.</p>
<p>The idea of potentially using multiple classes for each element struck me as bloating the file, but it makes sense.</p>
<p>So, my concerns:</p>
<p>Grids. Name them how you like: &#8220;.size2of3, .col1&#8243; but they work. If it were using those, or using &#8220;#primary&#8221; I know which I&#8217;d go with now.</p>
<p>The idea in the past has been that we could restyle #primary and change the width, padding, everything. But when has that happened? Restyling a website with JUST CSS?</p>
<p>I like presentation grids now.</p>
<p>The next thing, whether to go presentational on anything else? Colours, sizes? In some previous projects I used classes like &#8220;.orange&#8221;. This I feel is wrong. I now define primary, secondary and tertiary colours. Not only does this keep a sense of order through the whole project, but if you change the brand, the colours can change with no HTML amends (sounds a bit contradictory I know).</p>
<p>The next thing. Responsive. I&#8217;ve been a massive advocate of responsive, but the issue I have with presentational grids is that they no longer make sense when you want to change the view.</p>
<p>Some systems decide to revert to a 1 column approach. Whilst this might be OK for mobile, the tablet could be different. Zurb actually have phone class names that you can use. e.g. (&#8220;.size2of5 .phone1of1 .tablet1of2&#8243;) but that seems to require a lot of extra thinking, and extra bloat that is unnecessary.</p>
<p>I&#8217;m still thinking about this one. It also doesn&#8217;t cater for the &#8216;mobile first&#8217; approach.</p>
<p>So, there are lots of things to think about, but I do feel like it is the way to go.</p>
<p>Want to know more. Well, follow @csswizardry and @stubornella and check out the following pages:</p>
<ul>
<li><a href="https://github.com/stubbornella/oocss/wiki">https://github.com/stubbornella/oocss/wiki</a></li>
<li><a href="http://vimeo.com/44773888">http://vimeo.com/44773888</a></li>
<li><a href="http://oocss.org/">http://oocss.org/</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>https://paulrandall.com/2012/08/18/oocss/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CSS Shorthand</title>
		<link>https://paulrandall.com/2011/08/18/css-shorthand/</link>
		<comments>https://paulrandall.com/2011/08/18/css-shorthand/#comments</comments>
		<pubDate>Thu, 18 Aug 2011 11:20:59 +0000</pubDate>
		<dc:creator><![CDATA[Paul]]></dc:creator>
				<category><![CDATA[coding]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://prandall.com/?p=450</guid>
		<description><![CDATA[CSS shorthand is to me a no brainer and it’s use can have huge benefits – some of which include smaller file sizes, less code to read and it makes files quicker and easier to comprehend and maintain. In this post I’m going to be talking about box styling – any CSS effects that can [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>CSS shorthand is to me a no brainer and it’s use can have huge benefits – some of which include smaller file sizes, less code to read and it makes files quicker and easier to comprehend and maintain.</p>
<p>In this post I’m going to be talking about box styling – any CSS effects that can be implemented on all 4 sides of an element. This can include:</p>
<p><span id="more-450"></span></p>
<ul>
<li>padding</li>
<li>margins</li>
<li>borders</li>
</ul>
<p>There are 4 different ways of ways of applying styles to the sides of an element. The most conventional is the longest version which styles the sides clockwise from top, right, bottom and left. You can remember this as TrouBLe. This method allows you to set a different style on all 4 sides.</p>
<p><code>element{padding: [top] [right] [bottom] [left]}</code></p>
<p>Using 3 figures allows you to style the top, with left and right at the same time, followed by the bottom. This is useful if you require the same size on the left and right, but a different size for top and bottom.</p>
<p><code>element{padding: [top] [left/right] [bottom]}</code></p>
<p>Styling both the top and bottom, and the left and right sides can be done using 2 figures. This can be used when the top and bottom sizes are the same and the left and right sizes are the same.</p>
<p><code>element{padding: [top/bottom] [left/right]}</code></p>
<p>The last possibility is where all sides have the same size declaration. This can be achieved by using just one value.</p>
<p><code>element{padding: [top/bottom/left/right]}</code></p>
<h3>Bonus Tip</h3>
<p>When using 0 as a value, it doesn’t matter whether it is a pixel, em or any other measure so whenever using 0, just declare it on its own.</p>
]]></content:encoded>
			<wfw:commentRss>https://paulrandall.com/2011/08/18/css-shorthand/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Centre Aligned List Items</title>
		<link>https://paulrandall.com/2010/06/03/centre-aligned-list-items/</link>
		<comments>https://paulrandall.com/2010/06/03/centre-aligned-list-items/#comments</comments>
		<pubDate>Thu, 03 Jun 2010 21:17:33 +0000</pubDate>
		<dc:creator><![CDATA[Paul]]></dc:creator>
				<category><![CDATA[css]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://prandall.com/?p=358</guid>
		<description><![CDATA[This post has come from a quick bit of experimentation, trying to centre align list items. The design called for centerally aligned list item links, and there could be 3, 4, 5 or more links. Initially I was stumped as to how to create this effect. I had considered a left margin to create the [&#8230;]]]></description>
				<content:encoded><![CDATA[<p><strong>This post has come from a quick bit of experimentation, trying to centre align list items.</strong></p>
<p>The design called for centerally aligned list item links, and there could be 3, 4, 5 or more links. Initially I was stumped as to how to create this effect. I had considered a left margin to create the illusion of centre aligning for each possible number, but I knew there was a better way. I&#8217;m always aiming for a solution that works in the older browsers too, and this includes IE6. I don&#8217;t know why I do it to myself, especially as it apparently <a href="http://mashable.com/2010/06/01/ie6-below-5-percent/">only has less than a 5% market share</a> nowadays.</p>
<p><span id="more-358"></span></p>
<h2>The Example</h2>
<p>I&#8217;ll cut to the chase; here is the HTML and CSS.</p>
<p><a href="https://paulrandall.com/experimental/centre-ul/">https://paulrandall.com/experimental/centre-ul/</a></p>
<h3>So How Does It Work?</h3>
<p>On the UL, I am centre aligning the text, effectively making all the content aligning this way. That&#8217;s the real key to it, second only to display:inline on the LI, because a float will push everything to the left.</p>
<p>Below is all the CSS you need</p>
<p><code><br />
ul{text-align:center;}<br />
li{display:inline;}<br />
</code></p>
<p>Simples!</p>
]]></content:encoded>
			<wfw:commentRss>https://paulrandall.com/2010/06/03/centre-aligned-list-items/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>On &#8216;Magpie Designers&#8217;</title>
		<link>https://paulrandall.com/2010/05/26/on-magpie-designers/</link>
		<comments>https://paulrandall.com/2010/05/26/on-magpie-designers/#comments</comments>
		<pubDate>Wed, 26 May 2010 21:36:21 +0000</pubDate>
		<dc:creator><![CDATA[Paul]]></dc:creator>
				<category><![CDATA[css]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[thoughts]]></category>
		<category><![CDATA[trends]]></category>
		<category><![CDATA[web design]]></category>
		<category><![CDATA[websites]]></category>

		<guid isPermaLink="false">http://prandall.com/?p=353</guid>
		<description><![CDATA[In an ever-changing web world, new technologies are constantly evolving. With the emergence of alternative font display systems, new CSS effects and the increased uptake on modern browsers, designers are using these new techniques more and more. Add this to a sprinkling of current design &#8216;trends&#8217; such as the noise filter, and pixel perfect line [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>In an ever-changing web world, new technologies are constantly evolving. With the emergence of alternative font display systems, new CSS effects and the increased uptake on modern browsers, designers are using these new techniques more and more. Add this to a sprinkling of current design &#8216;trends&#8217; such as the noise filter, and pixel perfect line details and it makes for some very similar looking websites.</p>
<p>It is inevitable then that these new and shiny capabilities will catch a web designer&#8217;s eye (especially after years of browser constraints) but are we turning our eagerness to use the latest styling techniques into a world of monotonous and similar designs?</p>
<p><span id="more-353"></span></p>
<h2>A Screenshot Showing Some Modern Design Trends</h2>
<p><img src="https://paulrandall.com/wp-content/uploads/2010/05/similar-sites.jpg" alt="Modern web design trends" title="Modern web design trends" width="520" height="400" class="alignleft size-full wp-image-354" /></p>
<p>It&#8217;s worth saying that there are some great sites being produced at the minute. Something I hope to write about in a future post.</p>
<h2>I&#8217;m a Magpie Designer Too!</h2>
<p>This post isn&#8217;t without a sense of irony, i&#8217;m all too well aware of as this site features many of the effects i&#8217;m  talking about. I&#8217;m clearly a magpie designer too!</p>
<p><em>In a years time things will probably calm down when “the next thing” arrives, whatever it is.</em></p>
]]></content:encoded>
			<wfw:commentRss>https://paulrandall.com/2010/05/26/on-magpie-designers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CSS3 Multiple Backgrounds</title>
		<link>https://paulrandall.com/2010/03/19/css3-multiple-backgrounds/</link>
		<comments>https://paulrandall.com/2010/03/19/css3-multiple-backgrounds/#comments</comments>
		<pubDate>Fri, 19 Mar 2010 22:28:34 +0000</pubDate>
		<dc:creator><![CDATA[Paul]]></dc:creator>
				<category><![CDATA[css]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[background]]></category>
		<category><![CDATA[css3]]></category>
		<category><![CDATA[ie6]]></category>
		<category><![CDATA[png]]></category>

		<guid isPermaLink="false">http://prandall.com/?p=340</guid>
		<description><![CDATA[I thought it was about time I experimented with some CSS3 multiple backgrounds so I decided to play around with a wallpaper design I worked on in September. My experiment uses a top left, top right, bottom left and bottom right png gradient on the HTML element, with a repeating png overlay on the BODY. [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>I thought it was about time I experimented with some CSS3 multiple backgrounds so I decided to play around with a wallpaper design I worked on in September.
<p>My experiment uses a top left, top right, bottom left and bottom right png gradient on the HTML element, with a repeating png overlay on the BODY.</p>
<p><span id="more-340"></span></p>
<p><strong>As I firmly believe that you should make your design look at least acceptable in Internet Explorer 6, I have used Modernizr, a JavaScript library that allows you to take advantage of emerging web technologies.</strong></p>
<p>It&#8217;s the first time I have used it and I can see the huge potential of it. This system uses feature detection to add classes to the HTML document, allowing you to progressively enhance your websites.</p>
<p>In this example, I have been using <em>multiplebgs</em>, which allowed me to use the CSS3 technology only on sites that supported it. That allowed me to use a fallback JPG image for browsers that don&#8217;t.</p>
<h2>Here is the CSS code:</h2>
<p><code><br />
html.multiplebgs{<br />
	background-color: #141414;</p>
<p>	background-image: url("top-left.png"), url("top-right.png"),<br />
		url("bottom-left.png"), url("bottom-right.png");</p>
<p>	background-repeat: no-repeat, no-repeat,<br />
		no-repeat, no-repeat;</p>
<p>	background-position: top left, top right,<br />
		bottom left, bottom right;<br />
}<br />
body{background: url('fallback-bg.jpg') repeat; height:100%; width:100%;}<br />
.multiplebgs body{background: url('body-bg.png');}<br />
</code></p>
<h2>See the Example</h2>
<p><a href="https://paulrandall.com/experimental/css3-backgrounds/">https://paulrandall.com/experimental/css3-backgrounds/</a></p>
<p>If you have used multiple backgrounds before i&#8217;d love you to leave a comment and link to an example.</p>
]]></content:encoded>
			<wfw:commentRss>https://paulrandall.com/2010/03/19/css3-multiple-backgrounds/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>The Kitchen Sink of HTML</title>
		<link>https://paulrandall.com/2009/10/16/the-kitchen-sink-of-html/</link>
		<comments>https://paulrandall.com/2009/10/16/the-kitchen-sink-of-html/#comments</comments>
		<pubDate>Fri, 16 Oct 2009 19:10:13 +0000</pubDate>
		<dc:creator><![CDATA[Paul]]></dc:creator>
				<category><![CDATA[coding]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[downloads]]></category>
		<category><![CDATA[html]]></category>

		<guid isPermaLink="false">http://prandall.com/?p=207</guid>
		<description><![CDATA[Whenever I start a new project, I seem to be repeating myself when it comes to adding, and styling basic content: Headers, Lists and Tables etc. So I decided to create a &#8216;Kitchen Sink&#8217; of markup and basic styling, using some content from the great HTML-Ipsum.com plus a few extra bits. If you don&#8217;t currently [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Whenever I start a new project, I seem to be repeating myself when it comes to adding, and styling basic content: Headers, Lists and Tables etc.</p>
<p>So I decided to create a &#8216;Kitchen Sink&#8217; of markup and basic styling, using some content from the great <a href="http://html-ipsum.com/">HTML-Ipsum.com</a> plus a few extra bits.</p>
<p><span id="more-207"></span></p>
<p>If you don&#8217;t currently use something like this already, I do urge to add it to your next new website, because even if you don&#8217;t include a table, or list at the moment, you (or your client via WYSIWYG) may do in the future.</p>
<p>The document is actually HTML5 and UTF-8, but you can copy and paste the HTML/CSS however you like. I also tend to add a reset style inside a global stylesheet to save downloading two documents. I&#8217;d love hear how you layout or comment your CSS and whether you split them into different files such as layout and typography too.</p>
<h2>Open <a href="https://paulrandall.com/downloads/kitchensink.htm">kitchensink.htm</a></h2>
<p><em>Note: If you have any additional code or CSS which you think should go into the document, add a comment below. Thanks.</em></p>
]]></content:encoded>
			<wfw:commentRss>https://paulrandall.com/2009/10/16/the-kitchen-sink-of-html/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>Background Alignment Bug Fix</title>
		<link>https://paulrandall.com/2009/08/14/background-alignment-bug-fix/</link>
		<comments>https://paulrandall.com/2009/08/14/background-alignment-bug-fix/#comments</comments>
		<pubDate>Fri, 14 Aug 2009 20:08:06 +0000</pubDate>
		<dc:creator><![CDATA[Paul]]></dc:creator>
				<category><![CDATA[design]]></category>
		<category><![CDATA[browsers]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[html]]></category>

		<guid isPermaLink="false">http://prandall.com/?p=143</guid>
		<description><![CDATA[I have recently been working on sites which have had the need for pixel perfect alignment, and I came across an alignment anomaly among the major browsers. Previously, I have used IE7/ IE6 specific style sheets with completely new backgrounds, each 1px to the left or right of the original to compensate, but I decided [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>I have recently been working on sites which have had the need for pixel perfect alignment, and I came across an alignment anomaly among the major browsers.</p>
<p>Previously, I have used IE7/ IE6 specific style sheets with completely new backgrounds, each 1px to the left or right of the original to compensate, but I decided to do some digging and found this blog post:</p>
<p><a href="http://www.sohtanaka.com/web-design/1px-background-alignment-bug/">http://www.sohtanaka.com/web-design/1px-background-alignment-bug/</a></p>
<p>One of the comments I came across suggested a very simple alternative to multiple stylesheets and images, and is the version I used in my recent design:</p>
<blockquote><p><code>html{background: #242424 url('../img/background.gif') repeat-y center; margin-left: -.1px; /*1px shifting hack*/}</code></p></blockquote>
<p>A simple use of a margin allows the same image to be used for all browsers. What&#8217;s even better is that, although technically a <em>hack</em>, it is <a href="http://jigsaw.w3.org/css-validator/">valid</a>.</p>
]]></content:encoded>
			<wfw:commentRss>https://paulrandall.com/2009/08/14/background-alignment-bug-fix/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
