<?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>Webera webdesign</title>
	<atom:link href="http://webera.se/feed" rel="self" type="application/rss+xml" />
	<link>http://webera.se</link>
	<description></description>
	<lastBuildDate>Sun, 11 Dec 2011 17:01:43 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Mobile web adaptation &#8211; the basics</title>
		<link>http://webera.se/archives/78</link>
		<comments>http://webera.se/archives/78#comments</comments>
		<pubDate>Sun, 11 Dec 2011 17:01:43 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Mobile web]]></category>
		<category><![CDATA[mobile]]></category>

		<guid isPermaLink="false">http://webera.se/?p=78</guid>
		<description><![CDATA[The use of smartphones and tablets have as we all know gone through the roof already and this expects this to change. This has placed webdesigners in a bit of a bind, we do not only need to concider different browsers but also a large spectrum of screen sizes along with mouse and touch interaction. [...]]]></description>
			<content:encoded><![CDATA[<p>The use of smartphones and tablets have as we all know gone through the roof already and this expects this to change.</p>
<p>This has placed webdesigners in a bit of a bind, we do not only need to concider different browsers but also a large spectrum of screen sizes along with mouse and touch interaction.</p>
<p>The use on a webpage in a smartphone is so drastically different from using a PC that I&#8217;ve opted for the solution of pure mobile versions of a page.<br />
Some systems as wordpress have plugins that does this for you, which is very convenient.</p>
<p>I&#8217;ve gathered some of the essentials for getting started with your own adaptation in case you are not using a system with this functionality available.</p>
<h2>Metatags:</h2>
<p>These tags specifies the icon that is placed on the home screen when a page is added to it:</p>
<pre class="prettyprint lang-html linenums">&lt;link rel=&#34;apple-touch-icon&#34; href=&#34;&#47;img&#47;touch-icon-small.png&#34; &#47;&gt;
&lt;link rel=&#34;apple-touch-icon&#34; sizes=&#34;114x114&#34; href=&#34;&#47;img&#47;touch-icon-big.png&#34; &#47;&gt;
&lt;link rel=&#34;apple-touch-icon-precomposed&#34; href=&#34;&#47;img&#47;touch-icon-precomposed.png&#34; &#47;&gt;</pre>
<p>This metatag makes the page as wide as the device is and disables zooming. This is by far the most important metatag for a successful mobile adaptation</p>
<pre class="prettyprint lang-html linenums">&lt;meta name=&#34;viewport&#34; content=&#34;width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no&#34; &#47;&gt;</pre>
<p>The metatags below are mention rather frequently but are to me quite useless.<br />
First they only work if the page is loaded from the home screen as it would be an app.<br />
Secondly you are not reload a page. The entire site must be ajaxed, frankly thats a bit too advanced for my taste.</p>
<h2>Redirection</h2>
<p>There are a number of ways to do this, all of which spells Javascript.<br />
I have used a well written script by Sebastiano Armeli-Battana You can find it on<br />
github: https://github.com/sebarmeli/JS-Redirection-Mobile-Site<br />
the following should go into your header of the MAINSITE, before anything else:</p>
<pre class="prettyprint lang-html linenums">&lt;head&gt;
&lt;script type=&#34;text&#47;javascript&#34; src=&#34;&#47;javascript&#47;redirection_mobile.js&#34;&gt;&lt;&#47;script&gt;
&lt;script type=&#34;text&#47;javascript&#34; &gt;
SA.redirection_mobile ({ mobile_prefix : &#34;mobile&#34;, keep_path : true, keep_query : true });
&lt;&#47;script&gt;
the rest of your head content to follow after (no need to load them as we&#39;re not staying)
&lt;&#47;head&gt;</pre>
<p>This will redirect mobile devises from http://www.example.com/mobile-redirect to http://mobile.example.com/mobileredirect.<br />
The cookie_hours setting is so if you go back to the main site (manual links back), you do not trigger the script again.</p>
<p>That&#8217;s pretty much what you need to get started. Take your tempalte that you use for the normal website, condence it and clear all css for it and make a new one for the mobile website.<br />
Information about how to build the design, make it flexible etc will be written at a later time.</p>
<p>Have fun and go mobile!</p>
]]></content:encoded>
			<wfw:commentRss>http://webera.se/archives/78/feed</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Full height columns</title>
		<link>http://webera.se/archives/28</link>
		<comments>http://webera.se/archives/28#comments</comments>
		<pubDate>Sat, 22 Oct 2011 21:23:38 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Okategoriserade]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[css 2.1]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[xhtml 1.1]]></category>

		<guid isPermaLink="false">http://webera.se/?p=28</guid>
		<description><![CDATA[My main task at work being designing and/or implementing designs on webshops, I come across alot of columns. I&#8217;m no personal fan of them myself, but it is the traditional way, hence I see alot of it. &#160; One of the challanges with making a really nice column is you would like a background on [...]]]></description>
			<content:encoded><![CDATA[<p>My main task at work being designing and/or implementing designs on webshops, I come across alot of columns.</p>
<p>I&#8217;m no personal fan of them myself, but it is the traditional way, hence I see alot of it.</p>
<p>&nbsp;</p>
<p>One of the challanges with making a really nice column is you would like a background on it, might not be a very strong background, but something to make the distinction it is a column. This naturally presents a new problem; you cannot set height to 100% on a div and up with a column with a background ending at one third of the screen. Not very pretty.</p>
<p>&nbsp;</p>
<p>Now, there is a solution for it. if  you set an object to position absolute within a relative container, you CAN actually force it to become as high as its parent, simply by setting top:0 and bottom:0. This will force the object to become as high as its parent, given that that is set to position relative. You will need a jQuery script or javascript, to sort out when to use this solution so read on to the bottom as this is a somewhat complex problem.</p>
<p>&nbsp;</p>
<p>Case 1: single right column</p>
<p>Basic structure:<br />
<code></p>
<pre class="prettyprint lang-html linenums" >
&lt;div id=&#34;content&#34;&gt;
&lt;div id=&#34;main-content&#34;&gt;&lt;&#47;div&gt;
&lt;div id=&#34;right-column&#34;&gt;&lt;&#47;div&gt;
&lt;&#47;div&gt;
</pre>
<p></code></p>
<p><code></p>
<pre class="prettyprint lang-css linenums">
#content {
float:left;
clear:both;
width:980px;
background:blue; }

#main-content {
float:left;
width:680px;
margin-right:20px;
background:green; }

#right-column {
float:left;
width:280px;
background:red; }
</pre>
<p></code><br />
This will give you uneven columns based on what content goes into them, By adding the following css to the mix you will have a right column that is the same height as the parent (#content).</p>
<pre class="prettyprint lang-css linenums">
#content {
position:relative;
} 

#right-column {
position:absolute;
top:0;
right:0;
bottom:0; }
</pre>
<p>&nbsp;</p>
<p>You should now have two columns that has the same height, and so you have. Now lets stop to think about why that is.<br />
Position:relative among other things acts as container (acting body) for an object with position: absolute.<br />
This means that if you specify right:0 on an absolute object in a relative&#8217;d container it will snap its right side to the containers right side, if you specify top:0 and bottom:0 it will top its top at the top and its bottom and the bottom. This is why you now have a brand new fullheight column.</p>
<p>&nbsp;</p>
<p>Anything you&#8217;ve seen here so far can easily be found on the web, this method is used by quite alot of people, which is why I&#8217;m rather surprised that I haven&#8217;t seen anyone mention that the above conclusion is maybe not wrong, but incomplete.<br />
You do have a fullwidth right column, as long as you check your normal page, those filled with loads of content. When you check say search results that doesn&#8217;t return anything and your #main-content is all but empty you will find that you can&#8217;t actually use the solution above.</p>
<p>&nbsp;</p>
<p>Why can&#8217;t you use it?  What happens depends on your overflow settings on the objects, with overflow:visible, the content of the right column will swim out into nothing. with scroll you&#8217;ll get a scrollbar and with hidden you wont see the content of the right column.</p>
<p>&nbsp;</p>
<p>Now finally, the solution:<br />
A simple jQuery script to find out if the parent object of the right column is in fact higher than it self. if you don&#8217;t have content in your main content this will be untrue. The task for the script is to determain if you need to use the solution or not, adding a class to the parent element if you do. Then we use that class to actually do the extra css we just wrote.</p>
<pre class="prettyprint lang-js linenums">
jQuery:
$(document).ready(function(){
        if ( $(&#39;#content&#39;).height() &gt; $(&#39;#right-column&#39;).height() ) {
             $(&#39;#content&#39;).addClass(&#39;alter-height&#39;); } });
</pre>
<pre class="prettyprint lang-css linenums">
NEW CSS (replacing last section):
.alter-height {
postion:relative; } 

.alter-height #right-column {
position:absolute;
top:0;
right:0;
bottom:0;
}
</pre>
<p>&nbsp;</p>
<p>There it is, a full height right column working with dynamic content. Doing this with a left column or multiple columns is trickier so I&#8217;ll have to write a followup post on that at a later date.</p>
]]></content:encoded>
			<wfw:commentRss>http://webera.se/archives/28/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

