<?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/category/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>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>
	</channel>
</rss>
