Friday, 18 January 2013

<PRE> tags and white-space: pre style

When you need to preserve tab characters and line breaks within HTML elements other than multiline input fields, you can use the <pre> tag or the style attribute of white-space: pre.

Just noticed that there is a slight difference in using a <pre> tag and a div with the white-space: pre style attribute applied to it. As the default user agent setting for the font-family style attribute for a <pre> tag is mono

clip_image001

Found more of a description on this site... http://www.quirksmode.org/css/whitespace.html#t01

clip_image002

Use Plunkr to test it out if you like....

http://plnkr.co/edit/dqJKnD?p=preview

<!DOCTYPE html>
<html>

  <head lang="en">
    <meta charset="utf-8">
    <title>Awesome Game</title>
  <head>
 
  <body>
  <pre>Test this wer awereaw
   
    waerwearaw
    waeraw
    w
   
  </pre>
  <div id='content' style="white-space:pre">Content!
   
    waer
   
    weraweraw
    waera
    waer
  </div>
   
  </body>
 
</html>

Thursday, 17 January 2013

Project Silk for all your HTML web application needs

A colleague of mine pointed out this white paper article that Microsoft have kindly put together, which appears to be a full overview on how to construct a web site in this day an age.

"Guidance for building cross-browser web applications with a focus on client-side interactivity. These applications take advantage of the latest web standards like HTML5, CSS3 and ECMAScript 5 along with modern web technologies such as jQuery, Internet Explorer 9, and ASP.NET MVC3"

http://silk.codeplex.com/

You can also download it all in pdf format from the following link

http://www.microsoft.com/en-us/download/details.aspx?id=27290

Tuesday, 8 January 2013

Android mediaserver process killing battery life

If this happens to you, then do the following Force stop on Settings, Applications, All, Media Storage. Clear Cache and Clear Data, fo...