Niko Roberts' Blog

Travel Addict and Web and Desktop Developer

CSS Units in Short (why use em instead of pt or px)

After an afternoon of reading and searching:

1em is equal to the body font-size in the CSS, if there is no body font-size selected then it is whatever the browser default is.

Browser defaults vary depending on Operating System 16px on Windows or 14px on Mac OS X

So on Windows 1em is 16px and 2em is 32px

The reason 1em is the preferred unit for font-size is because it by design can be measured in values smaller than 1. 0.1em is 10% of the body font-size.
And most browsers display 1em in the same way.
Unlike font-size: 16.5px which gets rounded down to 16px by Internet Explorer 6 + 7

To test these differences try www.browsershots.org
This will take screenshots of your website run on lots of browsers and operating systems

Cheers,
Niko

Posted

Excited about HTML5

HTML5

The stuff that HTML5 is bringing to the table for web applications is really exciting. I am pretty confident it will bring web apps right to the edge of being as powerful as native apps.

Games
Lots of people are demonstrating how Canvas and SVG are going to bring 3D gaming to the browser. From what I have seen this seems a bit further away. The demand on the browser is pretty high and having a browser as a medium between a javascript based shoot-em-up and a graphics card, I imagine would add a fair bit of lag.
However, for strategy games there is a LOT of potential. I would love to see good multiplayer games ported onto the browser. Imagine EV Override (great Mac game) or World of Warcraft 3 in the browser.

Designers
I think there is a massive gap between designers creativity and the tools available to them to actually get their vision from their mind to the screen.
Being able to create objects in Adobe photoshop/in-design is easy. There are masses upon masses of great programmers who get paid a lot to get the designers Adobe document and then make it into HTML and CSS.
I hope we can create tools IN the browser that enable designers to actually work on web-design in the actual web. Removing the step between the existing native tools and the real implementation.
HTML5 will go a long way to enabling this.

Stuff to see:
http://think-app.appspot.com/
www.chromeexperiments.com/
http://mrdoob.com/
Posted