Home

Dive into the archives.


With Apple’s iPhone and iPod Touch, Google’s Android smartphones and other portable devices gradually dominating the market, it is getting more important to optimize websites to look better in these relatively-smaller-screen portable devices.

If you have been in CSS game for quite a while, you may think that defining media=handheld will do the trick

@media handheld {
  .navigation {
    display: none;
  }
}

Unfortunately Apple defined it in such that iPhones will look for “screen” media type instead of the limited “handheld” media which deem to be outdated.

The solution to this is to specify CSS rule that looks at the device screen resolution.

There are some sayings that Internet Explorer has issues ignoring the CSS rule, but that can be easily fixed with Internet Explorer’s “conditional comments” feature.

Conceptually, you can define a separate set of CSS for iPhone (or devices with width less than 480px) as follow:

<!--[if !IE]>-->
<link media="only screen and (max-device-width: 480px)" rel="stylesheet" type="text/css" href="iphone.css"/>
<!--<![endif]-->

And the iphone.css can be any CSS definitions that will overwrites the original CSS definitions.

Hopefully this basic and simple trick can help you to kick start your website revamp to cater for different sizes of portable devices.

Today when I tried to start MSSQL EXPRESS 2005 on my laptop in which I have not started the SQL service for quite some time, I received the following error:

Windows could not start the SQL Server (SQLEXPRESS2005) on Local Computer. For more information, review the System Event Log. If this is a non-Microsoft service, contact the service vendor, and refer to service-specific error code 3417.

And I found the following error detail in the Event Viewer (Windows XP: Start > Settings > Control Panel > Administrative Tools > Event Viewer > Application)

“The file ‘ C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\mastlog.ldf ‘ is compressed but does not reside in a read-only database or file group. The file must be decompressed.”

Immediately the cause was known. As my laptop disk space did run low quite some time ago, Windows actually helped to compress the files that were not used frequently. MSSQL doesn’t know how to load compressed database files, as simple as that.

I simply browse to ‘ C:\Program Files\Microsoft SQL Server\MSSQL.2\MSSQL\DATA\ ‘, right click on ‘ mastlog.ldf ‘, proceed to ‘ Properties > General > Advanced ‘ and uncheck ” Compress contents to save disk space “

If that still does not solve your problem, try to do the same for all the files under that folder, that should do the trick.

Cheers!

*Web Development

This is the archive for Web Development.

Sideblog


  • [01/28/2010]

    Apple has just announced their latest product - iPad (a new product category in between iPod Touch and Mac computer), starting at USD$499 - http://www.apple.com/ipad/

  • [12/09/2009]

    New SG iPhone plans released, from 2 carriers - http://bit.ly/5xzZ0I (M1) http://bit.ly/7f41zc (Starhub) - apparently M1 has the better deal, with 10GB & unlimited data bundle! woot!

  • [06/11/2009]

    WordPress "Baker" 2.8 released. Faster, redesigned theme management, new widget interface, and new Screen Options on every page. Find out more

  • My Wall


    Latest on Wed, 12:04

    d0rr: wth, my listing styles are not appearing, anyone can help to spot where the problem is??

    d0rr: larger font size, wider content area - does little changes make difference?

    d0rr: hey yuan, nice to see u here before u sleep :P

    TCY: hor hor hor Is time to sleep ~~~~~~~

    real rape footage: mm.. strange :)

    » Say something!



    *Who, adorr?

    I am a self-taught photographer who earns a living as web developer. I am a Technology Engineer, in which am professionally concerned with developing economical and safe solutions to practical problems. And if you are expecting the magical mixture between science and arts, you found me.



    • USA Road Trip 2009/10
    • W3 Silver Awards
    • Red Lanterns
    • Blossom
    • Cheng Ho Marine
    • Flight @ Dawn
    • Full Moon
    • Arial, 17px
    • Home-cooked, With Love
    • Pepper Lunch
    • Happy Birthday, Singapore
    • Lilo the Steeeetch
    • Hunny the Pooooooh