<?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"
	>

<channel>
	<title>Swedish fika</title>
	<atom:link href="http://swedishfika.com/feed" rel="self" type="application/rss+xml" />
	<link>http://swedishfika.com</link>
	<description>Just another WordPress weblog</description>
	<pubDate>Thu, 08 May 2008 09:35:34 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5</generator>
	<language>en</language>
			<item>
		<title>A lot of work to do</title>
		<link>http://swedishfika.com/2008/05/08/a-lot-of-work-to-do/</link>
		<comments>http://swedishfika.com/2008/05/08/a-lot-of-work-to-do/#comments</comments>
		<pubDate>Thu, 08 May 2008 09:35:34 +0000</pubDate>
		<dc:creator>Simon Kjellberg</dc:creator>
		
		<category><![CDATA[Blog]]></category>

		<guid isPermaLink="false">http://swedishfika.com/?p=72</guid>
		<description><![CDATA[As you can see we haven&#8217;t written any articles during a couple of weeks. The reason why is that we are currently working on our degree projects and they are taking up the most of our time. 
We will be back in a couple of weeks.
]]></description>
			<content:encoded><![CDATA[<p>As you can see we haven&#8217;t written any articles during a couple of weeks. The reason why is that we are currently working on our degree projects and they are taking up the most of our time. </p>
<p>We will be back in a couple of weeks.</p>
]]></content:encoded>
			<wfw:commentRss>http://swedishfika.com/2008/05/08/a-lot-of-work-to-do/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Take Photoshop Express for a test drive</title>
		<link>http://swedishfika.com/2008/04/02/take-photoshop-express-for-a-testdrive/</link>
		<comments>http://swedishfika.com/2008/04/02/take-photoshop-express-for-a-testdrive/#comments</comments>
		<pubDate>Wed, 02 Apr 2008 08:02:04 +0000</pubDate>
		<dc:creator>Simon Kjellberg</dc:creator>
		
		<category><![CDATA[News]]></category>

		<category><![CDATA[Resources]]></category>

		<guid isPermaLink="false">http://swedishfika.com/?p=66</guid>
		<description><![CDATA[You can take Adobe&#8217;s Photoshop Express (beta) for a test drive at  https://www.photoshop.com/express . We at Swedish fika like it a lot and believe we will see more of theese Rich Internet Applications in the near future.
]]></description>
			<content:encoded><![CDATA[<p>You can take Adobe&#8217;s Photoshop Express (beta) for a test drive at  <a title="https://www.photoshop.com/express" href="https://www.photoshop.com/express">https://www.photoshop.com/express</a> . We at Swedish fika like it a lot and believe we will see more of theese Rich Internet Applications in the near future.</p>
]]></content:encoded>
			<wfw:commentRss>http://swedishfika.com/2008/04/02/take-photoshop-express-for-a-testdrive/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Wordpress releases 2.5 and redesigns!</title>
		<link>http://swedishfika.com/2008/03/30/wordpress-releases-25-and-redesigns/</link>
		<comments>http://swedishfika.com/2008/03/30/wordpress-releases-25-and-redesigns/#comments</comments>
		<pubDate>Sat, 29 Mar 2008 23:06:52 +0000</pubDate>
		<dc:creator>Alexander Radsby</dc:creator>
		
		<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://swedishfika.com/2008/03/30/wordpress-releases-25-and-redesigns/</guid>
		<description><![CDATA[The new version of Wordpress is out. Download it here!
 And http://www.wordpress.org redesigns.
We at Swedishfika like it a lot and we have already updated our system.
]]></description>
			<content:encoded><![CDATA[<p>The new version of Wordpress is out. <a href="http://wordpress.org/download/">Download it here!</a></p>
<p> And <a href="http://www.wordpress.org">http://www.wordpress.org</a> redesigns.</p>
<p>We at Swedishfika like it a lot and we have already updated our system.</p>
]]></content:encoded>
			<wfw:commentRss>http://swedishfika.com/2008/03/30/wordpress-releases-25-and-redesigns/feed/</wfw:commentRss>
		</item>
		<item>
		<title>2 Great alternatives to Lightbox</title>
		<link>http://swedishfika.com/2008/03/27/2-great-alternatives-to-lightbox/</link>
		<comments>http://swedishfika.com/2008/03/27/2-great-alternatives-to-lightbox/#comments</comments>
		<pubDate>Thu, 27 Mar 2008 19:17:37 +0000</pubDate>
		<dc:creator>Alexander Radsby</dc:creator>
		
		<category><![CDATA[Javascript]]></category>

		<category><![CDATA[Resources]]></category>

		<guid isPermaLink="false">http://swedishfika.com/2008/03/27/2-great-alternatives-to-lightbox/</guid>
		<description><![CDATA[We all know the javascript functionality that is Lightbox 2.0. It&#8217;s simple, easy and really overused by the community. So here are a couple of examples for you guys to use.

Fancy Zoom


Focused on the smoothest, most polished zooming animation possible
Automatically scales images from any image link, with no HTML changes
Preloads full-size images in the background [...]]]></description>
			<content:encoded><![CDATA[<p>We all know the javascript functionality that is <a href="http://www.huddletogether.com/projects/lightbox2/">Lightbox 2.0</a>. It&#8217;s simple, easy and really overused by the community. So here are a couple of examples for you guys to use.<br />
<span id="more-54"></span></p>
<h3>Fancy Zoom</h3>
<p><img src='http://swedishfika.com/wp-content/uploads/fancyzoom.jpg' alt='Fancy Zoom' /></p>
<ul>
<li>Focused on the smoothest, most polished zooming animation possible</li>
<li>Automatically scales images from any image link, with no HTML changes</li>
<li>Preloads full-size images in the background on link mouseover</li>
<li>No resource-heavy Javascript libraries — 100% coded from scratch to zoom</li>
<li>Draws a nice drop shadow under the full-size image to offset it from the page</li>
<li>Uses Safari 3&#8217;s &#8220;box-shadow&#8221; feature to draw the drop shadow natively, no images required</li>
<li>Requires only two new lines of code in your HTML</li>
<li>Tested and works with Safari, Firefox, IE7, and IE6. (Looks better in modern browsers.)</li>
</ul>
<p><br/>You can get it here: <a href="http://www.cabel.name/draft1/2008/02/fancyzoom-10.html">Fancy Zoom</a></p>
<h3>Highslide</h3>
<p><img src='http://swedishfika.com/wp-content/uploads/highslide.jpg' alt='Highslide' /></p>
<ul>
<li>No plugins like Flash or Java required.</li>
<li>Popup blockers are no problem. The content expands within the active browser window.</li>
<li>Single click. After opening the image or HTML popup, the user can scroll further down or leave the page without closing it.</li>
<li>Compatibility and safe fallback. If the user has disabled JavaScript or is using an old browser, the browser redirects directly to the image itself or to a fallback HTML page.</li>
</ul>
<p><br/>You can get it here: <a href="http://vikjavev.no/highslide/">Highslide</a></p>
]]></content:encoded>
			<wfw:commentRss>http://swedishfika.com/2008/03/27/2-great-alternatives-to-lightbox/feed/</wfw:commentRss>
		</item>
		<item>
		<title>The Elements of Typographic Style</title>
		<link>http://swedishfika.com/2008/03/08/the-elements-of-typographic-style/</link>
		<comments>http://swedishfika.com/2008/03/08/the-elements-of-typographic-style/#comments</comments>
		<pubDate>Sat, 08 Mar 2008 09:04:08 +0000</pubDate>
		<dc:creator>Alexander Radsby</dc:creator>
		
		<category><![CDATA[Typography]]></category>

		<guid isPermaLink="false">http://swedishfika.com/2008/03/08/the-elements-of-typographic-style/</guid>
		<description><![CDATA[Following the last entry, this is The Elements of Typographic Style, Applied to the web.
We all know how important typography on the web is, and for those who doesn&#8217;t like to buy books about it can read it on the web. This is a great resource for learning the basics of typography on the web. [...]]]></description>
			<content:encoded><![CDATA[<p>Following the last entry, this is The Elements of Typographic Style, Applied to the web.</p>
<p>We all know how important typography on the web is, and for those who doesn&#8217;t like to buy books about it can read it on the web. This is a great resource for learning the basics of typography on the web. I recommend that everyone who wants to be a good webdesigner reads this.</p>
<p>Check it out: <a href="http://www.webtypography.net/">http://www.webtypography.net/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://swedishfika.com/2008/03/08/the-elements-of-typographic-style/feed/</wfw:commentRss>
		</item>
		<item>
		<title>TypeNeu, Typography news</title>
		<link>http://swedishfika.com/2008/03/05/typeneu-typography-news/</link>
		<comments>http://swedishfika.com/2008/03/05/typeneu-typography-news/#comments</comments>
		<pubDate>Wed, 05 Mar 2008 11:45:16 +0000</pubDate>
		<dc:creator>Alexander Radsby</dc:creator>
		
		<category><![CDATA[News]]></category>

		<category><![CDATA[Typography]]></category>

		<guid isPermaLink="false">http://swedishfika.com/2008/03/05/typeneu-typography-news/</guid>
		<description><![CDATA[&#8220;TypeNeu is a social platform and source of inspiration for all you typophiles out there. We report on the past, present and the future (mostly present &#38; the future) of typographic culture. Typophile is a common diagnosis, and yes this is the cure.&#8221;
I couldn&#8217;t say it better myself.
Check it out: http://www.typeneu.com/ 
]]></description>
			<content:encoded><![CDATA[<p>&#8220;TypeNeu is a social platform and source of inspiration for all you typophiles out there. We report on the past, present and the future (mostly present &amp; the future) of typographic culture. Typophile is a common diagnosis, and yes this is the cure.&#8221;</p>
<p>I couldn&#8217;t say it better myself.<br />
Check it out: <a href="http://www.typeneu.com/ ">http://www.typeneu.com/ </a></p>
]]></content:encoded>
			<wfw:commentRss>http://swedishfika.com/2008/03/05/typeneu-typography-news/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Creating a fading header</title>
		<link>http://swedishfika.com/2008/03/04/creating-a-fading-header/</link>
		<comments>http://swedishfika.com/2008/03/04/creating-a-fading-header/#comments</comments>
		<pubDate>Tue, 04 Mar 2008 22:59:59 +0000</pubDate>
		<dc:creator>Fredrik W</dc:creator>
		
		<category><![CDATA[CSS]]></category>

		<category><![CDATA[Javascript]]></category>

		<category><![CDATA[Tutorials]]></category>

		<category><![CDATA[XHTML]]></category>

		<guid isPermaLink="false">http://swedishfika.com/2008/03/04/creating-a-fading-header/</guid>
		<description><![CDATA[Since I&#8217;ve gotten lots of emails asking me how I created the fading header graphic for Bits and Pixels I&#8217;m going to write a tutorial explaining how created the effect. I&#8217;ll be creating the effect using some basic XHTML and CSS and some unobtrusive Javascript, using the jQuery library, for the effect itself.

I&#8217;ve chosen jQuery [...]]]></description>
			<content:encoded><![CDATA[<p>Since I&#8217;ve gotten lots of emails asking me how I created the fading header graphic for <a href="http://bitsamppixels.com" title="Bits and Pixels">Bits and Pixels</a> I&#8217;m going to write a tutorial explaining how created the effect. I&#8217;ll be creating the effect using some basic XHTML and CSS and some unobtrusive Javascript, using the <a href="http://jquery.com" title="jQuery Javascript library">jQuery</a> library, for the effect itself.</p>
<p><span id="more-45"></span><br />
I&#8217;ve chosen jQuery because I like the way it&#8217;s built, find the elements you wish and do something with them. If you prefer another library, or just don&#8217;t want to use any library at all, that&#8217;s fine too (but you&#8217;ll need to write your own fade-function). The code shouldn&#8217;t differ too much, and since I&#8217;ll be explaining all the steps you shouldn&#8217;t have any problems translating it to the toolkit of your choice.</p>
<h3>The image</h3>
<p>This is the image that I&#8217;ll be using. It&#8217;s a fast mock-up of a header with a little bit of grunge. I&#8217;ve included the regular header and the hover effect in the same image. This lowers our HTTP requests, avoids flickering when we hover the image and makes our CSS more straight forward.</p>
<p><img src="http://swedishfika.com/wp-content/uploads/header1.jpg" alt="Header image" /></p>
<h3>The HTML and CSS</h3>
<p>The HTML is very straight forward. We have a h1 element with a link inside of it. We&#8217;re going to hook our Javascript onto our header (or whichever element we want to add this effect to) and add some custom markup.<br />
<code>&lt;h1 id="header"&gt;&lt;a href="#"&gt;Awesome header&lt;/a&gt;&lt;/h1&gt;</code></p>
<p>Now we&#8217;ll add some CSS to style our header and give it some imagery</p>
<p><code>#header {<br />
  margin: 0;<br />
  padding: 0;<br />
  text-indent: -9999px;<br />
  width: 400px;<br />
  height: 225px;<br />
  position: relative;<br />
  margin-left: -1em;<br />
  background: url(header.jpg) no-repeat;<br />
}<br />
#header a {<br />
  position: absolute; // This allows us to have<br />
  top: 0; // the anchor on top of the header<br />
  left: 0;<br />
  width: 400px;<br />
  height: 225px;<br />
  display: block;<br />
  border: 0;<br />
  background: transparent;<br />
  overflow: hidden;<br />
}</code></p>
<p>The reason to why we&#8217;re setting the h1 to position: relative; is to make it easier to position the imagery for the hover when we add it.</p>
<p>Here&#8217;s <a href="http://bitsamppixels.com/fading-header/example1.html" rel="nofollow">an example</a> showing what we&#8217;ve got so far.</p>
<p>When we load the page we&#8217;re going to  add some custom markup, so this is what we&#8217;ll have to work with in our <abbr title="Document Object Model">DOM</abbr>. The reason we&#8217;re adding the span before the anchor is to avoid some issues with Internet Explorer 6 and the z-index property.</p>
<p><code>&lt;h1 id="header"&gt;<br />
  &lt;span class="fake-hover"&gt;&lt;/span&gt;<br />
  &lt;a href="#"&gt;Awesome header&lt;/a&gt;<br />
&lt;/h1&gt;</code></p>
<p>So, let&#8217;s start out by adding this markup manually into our document so we can see what it will look like when we apply the effect. Then we&#8217;ll adding the following CSS:</p>
<p><code>#header .fake-hover {<br />
  margin: 0;<br />
  padding: 0;<br />
  width: 400px;<br />
  height: 225px;<br />
  display: block;<br />
  position: absolute;<br />
  top: 0;<br />
  left: 0;<br />
  background: url(header.jpg) no-repeat 0 -240px;<br />
}</code></p>
<p>It&#8217;s important to make sure that the text doesn&#8217;t shift a pixel or two since it will be very obvious when the effect kicks in. You may want to try this a couple of times by removing and adding the span to make sure it&#8217;s properly aligned.</p>
<p>Here&#8217;s <a href="http://bitsamppixels.com/fading-header/example2.html" rel="nofollow">an example</a> of what we&#8217;ve got so far.</p>
<h3>The Javascript</h3>
<p>Now that we&#8217;re all set markup and CSS-wise it&#8217;s time to start adding some Javascript goodness! First of all, remove the fake span from your document.</p>
<p>As I wrote earlier, I&#8217;ll be using <a href="http://jquery.com">jQuery</a>, but feel free to follow along no matter what library you may or may not be using.  I&#8217;m going to write this using <a href="http://en.wikipedia.org/wiki/JSON" title="JSON on Wikipedia">JSON</a> to make the script more modular. I&#8217;ll also write it as a more general function so it&#8217;s easier to add the effect to any element you want to on your site.</p>
<p>First load the jQuery library</p>
<p><code>&lt;script type="text/javascript" src="jquery-1.2.3.min.js"&gt;<br />
&lt;/script&gt;</code></p>
<p>Now let&#8217;s add some code. I&#8217;ll be adding it directly into the document but you may want to use an external file for a live site.</p>
<p><code><br />
var Header = {<br />
  addFade : function(selector){<br />
    $("&lt;span class=\"fake-hover\"&gt;&lt;/span&gt;").css("display",<br />
    "none").prependTo($(selector));<br />
    // Safari dislikes hide() for some reason<br />
  }<br />
};</code></p>
<p>Okay. This function takes a CSS-selector as argument, adds our fake hover and hides it. Simple stuff. Now let&#8217;s expand our Header object adding some Javascript events for hovering and removing the mouse, and finally making it load when the page loads. When the mouse is hovered over the header, we fade in the other header graphics, and when the mouse is moved off we fade it out, using jQuery&#8217;s built in effects.</p>
<p><code>var Header = {<br />
  // Let's write in JSON to make it more modular<br />
  addFade : function(selector){<br />
    $("&lt;span class=\"fake-hover\"&gt;&lt;/span&gt;").css("display",<br />
      "none").prependTo($(selector));<br />
      // Safari dislikes hide() for some reason<br />
      $(selector+" a").bind("mouseenter",function(){<br />
      $(selector+" .fake-hover").fadeIn("slow");<br />
    });<br />
    $(selector+" a").bind("mouseleave",function(){<br />
      $(selector+" .fake-hover").fadeOut("slow");<br />
    });<br />
  }<br />
};<br />
$(function(){<br />
  Header.addFade("#header");</code></p>
<p><code>// This makes sure our function executes when the pages load<br />
// It will add a fake hove to the #header element</code></p>
<p><code>});</code></p>
<p>Ok, that&#8217;s it! Check out <a href="http://bitsamppixels.com/fading-header/" title="Fading header">this page</a> for a live demo of the effect in action. Hope you learned something <img src='http://swedishfika.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Oh, and if you like it, feel free to give it a <a href="http://digg.com/design/Creating_a_flash_like_header_effect_with_javascript_and_CSS">digg</a>!</p>
<p>/ <a href="http://bitsamppixels.com">Fredrik</a></p>
<p>PS. I apologize if the code-tags are a bit bugged at the bottom, I blame wordpress!</p>
]]></content:encoded>
			<wfw:commentRss>http://swedishfika.com/2008/03/04/creating-a-fading-header/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Achieve AlternatingRowStyle BackColor with a repeater</title>
		<link>http://swedishfika.com/2008/02/26/achieve-alternatingrowstyle-backcolor-with-a-repeater/</link>
		<comments>http://swedishfika.com/2008/02/26/achieve-alternatingrowstyle-backcolor-with-a-repeater/#comments</comments>
		<pubDate>Tue, 26 Feb 2008 15:30:10 +0000</pubDate>
		<dc:creator>Simon Kjellberg</dc:creator>
		
		<category><![CDATA[ASP.NET]]></category>

		<category><![CDATA[CSS]]></category>

		<category><![CDATA[Tutorials]]></category>

		<category><![CDATA[XHTML]]></category>

		<guid isPermaLink="false">http://swedishfika.com/2008/02/26/achieve-alternatingrowstyle-backcolor-with-a-repeater/</guid>
		<description><![CDATA[If you want an alternating background color on a row in a gridview it&#8217;s just to add the AternatingRowStyle-BackColor-attribute. It&#8217;s not the same thing with a repeater but this is how you do it.
If you want the repeater to have an alternating background color on the rows in a table it&#8217;s just to add an [...]]]></description>
			<content:encoded><![CDATA[<p>If you want an alternating background color on a row in a gridview it&#8217;s just to add the AternatingRowStyle-BackColor-attribute. It&#8217;s not the same thing with a repeater but this is how you do it.</p>
<p><span id="more-33"></span>If you want the repeater to have an alternating background color on the rows in a table it&#8217;s just to add an alternating template and add a css-class to the &lt;tr&gt; that&#8217;s in the alternating template.</p>
<p><code>&lt;table id="tableListOfUsers" class="list-of-users"&gt;<br />
  &lt;tr&gt;<br />
    &lt;th&gt;Name&lt;/th&gt;<br />
  &lt;/tr&gt;<br />
  &lt;asp:Repeater ID="RepeaterListOfUsers" runat="server"&gt;<br />
    &lt;ItemTemplate&gt;<br />
      &lt;tr&gt;<br />
        &lt;td&gt;&lt;%# Eval("Name") %&gt;&lt;/td&gt;<br />
      &lt;/tr&gt;<br />
    &lt;/ItemTemplate&gt;<br />
    &lt;AlternatingItemTemplate&gt;<br />
      &lt;tr class="alternating"&gt;<br />
        &lt;td&gt;&lt;%# Eval("Name") %&gt;&lt;/td&gt;<br />
      &lt;/tr&gt;<br />
    &lt;/AlternatingItemTemplate&gt;<br />
  &lt;/asp:Repeater&gt;<br />
&lt;/table&gt;</code></p>
<p><em>/Simon Kjellberg </em></p>
]]></content:encoded>
			<wfw:commentRss>http://swedishfika.com/2008/02/26/achieve-alternatingrowstyle-backcolor-with-a-repeater/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Display confirm box when clicking a link</title>
		<link>http://swedishfika.com/2008/02/25/display-confirm-box-when-clicking-a-link/</link>
		<comments>http://swedishfika.com/2008/02/25/display-confirm-box-when-clicking-a-link/#comments</comments>
		<pubDate>Mon, 25 Feb 2008 21:03:45 +0000</pubDate>
		<dc:creator>Simon Kjellberg</dc:creator>
		
		<category><![CDATA[CSS]]></category>

		<category><![CDATA[Javascript]]></category>

		<category><![CDATA[Tutorials]]></category>

		<category><![CDATA[XHTML]]></category>

		<guid isPermaLink="false">http://swedishfika.com/2008/02/25/display-confirm-box-when-clicking-a-link/</guid>
		<description><![CDATA[There are many times when you want the user to confirm an option he/she tries to perform and in this example I will show how you can use a simple Javascript to display a confirm box when a user clicks on a link.

 The XHTML
&#60;a href="test.html"&#62;Delete user&#60;/a&#62;
Now add the onclick attribute and write the Javascript
&#60;a [...]]]></description>
			<content:encoded><![CDATA[<p>There are many times when you want the user to confirm an option he/she tries to perform and in this example I will show how you can use a simple Javascript to display a confirm box when a user clicks on a link.</p>
<p><span id="more-28"></span></p>
<h3> The XHTML</h3>
<p><code>&lt;a href="test.html"&gt;Delete user&lt;/a&gt;</code></p>
<p>Now add the onclick attribute and write the Javascript</p>
<p><code>&lt;a href="test.html" onclick="return confirm('Are you sure?');"&gt;<br />
  Delete user<br />
&lt;/a&gt;</code></p>
<p>If the user clicks on the link he/she must confirm the action. If the user clicks on the OK button in the confirm box the link will be followed, if not the link will not be followed.</p>
<p><em>/Simon Kjellberg </em></p>
]]></content:encoded>
			<wfw:commentRss>http://swedishfika.com/2008/02/25/display-confirm-box-when-clicking-a-link/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Horizontally and vertically center a box in the browser window</title>
		<link>http://swedishfika.com/2008/02/24/horizontally-and-vertically-center-a-box-in-the-browser-window/</link>
		<comments>http://swedishfika.com/2008/02/24/horizontally-and-vertically-center-a-box-in-the-browser-window/#comments</comments>
		<pubDate>Sun, 24 Feb 2008 13:43:37 +0000</pubDate>
		<dc:creator>Simon Kjellberg</dc:creator>
		
		<category><![CDATA[CSS]]></category>

		<category><![CDATA[Tutorials]]></category>

		<category><![CDATA[XHTML]]></category>

		<guid isPermaLink="false">http://swedishfika.com/2008/02/24/horizontally-and-vertically-centre-a-website-in-the-browser-window/</guid>
		<description><![CDATA[In this guide I will show how you can horizontally and vertically center a box in the browser window. I&#8217;ve used as little markup and CSS as I think is possible just to make this example easy to grasp.

The XHTML
&#60;div class="box"&#62;
  &#60;!-- Website content goes here --&#62;
&#60;/div&#62;
The CSS
div.box{
  width: 500px;
  height: 400px;
 [...]]]></description>
			<content:encoded><![CDATA[<p>In this guide I will show how you can horizontally and vertically center a box in the browser window. I&#8217;ve used as little markup and CSS as I think is possible just to make this example easy to grasp.</p>
<p><span id="more-25"></span></p>
<h3>The XHTML</h3>
<p><code>&lt;div class="box"&gt;<br />
  &lt;!-- Website content goes here --&gt;<br />
&lt;/div&gt;</code></p>
<h3>The CSS</h3>
<p><code>div.box{<br />
  width: 500px;<br />
  height: 400px;<br />
  position: absolute;<br />
  top: 50%;<br />
  left: 50%;<br />
  margin-top: -200px; /* height/2 = 200 */<br />
  margin-left: -250px; /* width/2 = 250 */<br />
}</code></p>
<p>You can also make this shorthand like this:</p>
<p><code>div.box{<br />
  width: 500px;<br />
  height: 400px;<br />
  position: absolute;<br />
  top: 50%;<br />
  left: 50%;<br />
  margin: -200px 0 0 -250px;<br />
}</code></p>
<p><em>/Simon Kjellberg </em></p>
]]></content:encoded>
			<wfw:commentRss>http://swedishfika.com/2008/02/24/horizontally-and-vertically-center-a-box-in-the-browser-window/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
