<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="https://shkspr.mobi/blog/wp-content/themes/edent-wordpress-theme/rss-style.xsl" type="text/xsl"?>
<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>responsive &#8211; Terence Eden’s Blog</title>
	<atom:link href="https://shkspr.mobi/blog/tag/responsive/feed/" rel="self" type="application/rss+xml" />
	<link>https://shkspr.mobi/blog</link>
	<description>Regular nonsense about tech and its effects 🙃</description>
	<lastBuildDate>Tue, 16 Sep 2025 08:13:33 +0000</lastBuildDate>
	<language>en-GB</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://shkspr.mobi/blog/wp-content/uploads/2023/07/cropped-avatar-32x32.jpeg</url>
	<title>responsive &#8211; Terence Eden’s Blog</title>
	<link>https://shkspr.mobi/blog</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title><![CDATA[Responsive Yearly Calendar with Flexbox]]></title>
		<link>https://shkspr.mobi/blog/2023/04/responsive-yearly-calendar-with-flexbox/</link>
					<comments>https://shkspr.mobi/blog/2023/04/responsive-yearly-calendar-with-flexbox/#comments</comments>
				<dc:creator><![CDATA[@edent]]></dc:creator>
		<pubDate>Fri, 28 Apr 2023 11:34:47 +0000</pubDate>
				<category><![CDATA[/etc/]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[flexbox]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[responsive]]></category>
		<guid isPermaLink="false">https://shkspr.mobi/blog/?p=45646</guid>

					<description><![CDATA[This blog has a calendar showing my yearly archives. It was in a table layout - which made sense when I first designed it - but had a few spacing niggles and was hard to make responsive.  Now, it behaves like this:    The code is relatively straightforward.  The HTML for the calendar looks like this:  &#60;div class=&#34;calendars&#34;&#62;     &#60;div class=&#34;calendar&#34;&#62;         &#60;div class=&#34;calendar-year&#34;&#62;2018&#60;/div&#62; …]]></description>
										<content:encoded><![CDATA[<p>This blog has a calendar showing my yearly archives. It was in a table layout - which made sense when I first designed it - but had a few spacing niggles and was hard to make responsive.</p>

<p>Now, it behaves like this:</p>

<p><video width="1024" height="576" src="https://shkspr.mobi/blog/wp-content/uploads/2023/04/Responsive-Calendar.mp4" mute="" loop="" autoplay=""></video></p>

<p>The code is relatively straightforward.  The HTML for the calendar looks like this:</p>

<pre><code class="language-html">&lt;div class="calendars"&gt;
    &lt;div class="calendar"&gt;
        &lt;div class="calendar-year"&gt;2018&lt;/div&gt;
        &lt;div class="calendar-month"&gt;January&lt;/div&gt;
        &lt;div class="calendar-month"&gt;February&lt;/div&gt;
        &lt;div class="calendar-month"&gt;March&lt;/div&gt;
        &lt;div class="calendar-month"&gt;April&lt;/div&gt;
        &lt;div class="calendar-month"&gt;May&lt;br&gt;&lt;/div&gt;
        &lt;div class="calendar-month"&gt;June&lt;/div&gt;
        &lt;div class="calendar-month"&gt;July&lt;/div&gt;
        &lt;div class="calendar-month"&gt;August&lt;/div&gt;
        &lt;div class="calendar-month"&gt;September&lt;/div&gt;
        &lt;div class="calendar-month"&gt;October&lt;/div&gt;
        &lt;div class="calendar-month"&gt;November&lt;/div&gt;
        &lt;div class="calendar-month"&gt;December&lt;/div&gt;
    &lt;/div&gt;

    &lt;div class="calendar"&gt;
        &lt;div class="calendar-year"&gt;2017&lt;/div&gt;
        &lt;div class="calendar-month"&gt;January&lt;/div&gt;
        &lt;div class="calendar-month"&gt;February&lt;/div&gt;
                ...
</code></pre>

<p>Repeat as many times as needed.</p>

<p>The CSS is slightly more tricky, but mercifully short:</p>

<p>The wrapper which holds all the calendars uses <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/flex-wrap"><code>flex-wrap</code></a>. This means there's no need to set explicit breakpoints - if there's no horizontal space, the calendar will move to the next row.</p>

<pre><code class="language-css">.calendars {
    display: flex;
    flex-wrap: wrap;
}
</code></pre>

<p>Each individual calendar item is <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/grid-template-columns">a grid with three column layout</a>:</p>

<pre><code class="language-css">.calendar {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    margin: .5em;
}
</code></pre>

<p>The "Year" at the top spans the first three columns. I find the <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/grid-column-end"><code>grid-column-...</code> syntax</a> confusing!</p>

<pre><code class="language-css">.calendar-year {
    grid-column-start: 1;
    grid-column-end: 4;
    text-align: center;
    outline: 1px black solid;
}
</code></pre>

<p>Finally, each individual month has a bit of internal padding and text formatting:</p>

<pre><code class="language-css">.calendar-month {
    text-align: center;
    padding: .25em;
    outline: 1px black solid;
}
</code></pre>

<p>I've used a basic black <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/outline"><code>outline</code></a>. Obviously, you can add whatever fancy CSS you like to make them look prettier.</p>
<img src="https://shkspr.mobi/blog/wp-content/themes/edent-wordpress-theme/info/okgo.php?ID=45646&HTTP_REFERER=RSS" alt="" width="1" height="1" loading="eager">]]></content:encoded>
					
					<wfw:commentRss>https://shkspr.mobi/blog/2023/04/responsive-yearly-calendar-with-flexbox/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		<enclosure url="https://shkspr.mobi/blog/wp-content/uploads/2023/04/Responsive-Calendar.mp4" length="117070" type="video/mp4" />

			</item>
		<item>
		<title><![CDATA[BBC News Don't Get Responsive Design]]></title>
		<link>https://shkspr.mobi/blog/2012/12/bbc-news-dont-get-responsive-design/</link>
					<comments>https://shkspr.mobi/blog/2012/12/bbc-news-dont-get-responsive-design/#respond</comments>
				<dc:creator><![CDATA[@edent]]></dc:creator>
		<pubDate>Thu, 13 Dec 2012 12:00:18 +0000</pubDate>
				<category><![CDATA[politics]]></category>
		<category><![CDATA[BBC]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[responsive]]></category>
		<category><![CDATA[web]]></category>
		<guid isPermaLink="false">http://shkspr.mobi/blog/?p=7000</guid>

					<description><![CDATA[In October, I was interviewed in Econsultancy about the BBC&#039;s new &#34;responsive&#34; website.  I said:  The BBC&#039;s mobile site is fairly responsive.  If you view it on different sized phones and tablets it adapts quite well. But it is an entirely separate site from the main BBC news site.  The BBC are doing device detection and redirecting mobile users. It&#039;s not a bad strategy per se - but it is not…]]></description>
										<content:encoded><![CDATA[<p>In October, <a href="https://web.archive.org/web/20121204041804/http://econsultancy.com/uk/blog/10977-what-is-responsive-design-and-do-you-really-need-it">I was interviewed in Econsultancy about the BBC's new "responsive" website</a>.</p>

<p>I said:</p>

<blockquote><p>The BBC's mobile site is fairly responsive.  If you view it on different sized phones and tablets it adapts quite well. But it is an entirely separate site from the main BBC news site.

The BBC are doing device detection and redirecting mobile users. It's not a bad strategy per se - but it is not best practice</p></blockquote>

<p>Clicking on a link on the BBC's front page today, lead to this "responsive" experience.</p>

<img title="" class="alignnone" alt="image" src="https://shkspr.mobi/blog/wp-content/uploads/2012/12/wpid-Screenshot_2012-12-12-06-58-40.png">

<p>A completely blank page.  The <a href="http://www.bbc.co.uk/news/technology-20678217">full-fat site contains a clever chart</a>.</p>

<p>Ideally, your mobile site should contain the same content as your main site.  It's not a huge sin if it can't (for technical reasons) but you need to ensure that your CMS detects pages which are unsuitable for mobile and ensures that links towards them are removed.</p>

<p>Otherwise, you end up in this silly situation where mobile users are served content which you simply can't show them.</p>

<p>Of course, the <a href="https://twitter.com/edent/status/261704308154855424/">reverse can be just as bad</a>.
<a href="https://twitter.com/edent/status/261704308154855424/"><img src="https://shkspr.mobi/blog/wp-content/uploads/2012/12/A6HCroQCcAElufY.pngsmall.png" alt="BBC Responsive Fail" width="340" height="604" class="aligncenter size-full wp-image-7003"></a></p>

<p>Come on BBC, sort it out!</p>
<img src="https://shkspr.mobi/blog/wp-content/themes/edent-wordpress-theme/info/okgo.php?ID=7000&HTTP_REFERER=RSS" alt="" width="1" height="1" loading="eager">]]></content:encoded>
					
					<wfw:commentRss>https://shkspr.mobi/blog/2012/12/bbc-news-dont-get-responsive-design/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
