How CSS class attributes have to be ordered

Thursday, September 4, 2014

How to order a CSS class attributes.

The poll result of http://css-tricks.com/poll-results-how-do-you-order-your-css-properties/ shows many uses or suggest to order them by Randomly or Grouped by type.
But here is my point, when you have number of attributed stacking up, there are changes for attributes to get duplicate. see the following example

.selector {
    position: absolute;
    z-index: 10;
    top: 0;
    font-family: sans-serif;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100px;
    height: 100px;
    padding: 10px;
    border: 10px solid #333;
    margin: 10px;
    background: #000;
    color: #fff;
    font-size: 16px;
    text-align: right;
    display: inline-block;
    overflow: hidden;
    padding: 10px;
    box-sizing: border-box;
}

Padding is duplicated on the above sample, which is bit difficult to find it out. So Randomly is a bad habit.

My selection will be Alphabetic, where you got to know A-Z to sort them up and will easily out the above issue.

.selector {
    background: #000;
    border: 10px solid #333;
    bottom: 0;
    box-sizing: border-box;
    color: #fff;
    display: inline-block;
    font-family: sans-serif;
    font-size: 16px;
    height: 100px;
    left: 0;
    margin: 10px;
    overflow: hidden;
    padding: 10px;
    padding: 10px;
    position: absolute;
    right: 0;
    text-align: right;
    top: 0;
    width: 100px;
    z-index: 10;
}

Yes, as sampled here https://github.com/necolas/idiomatic-css#format, grouping by type is cool. But I still recommend to sort by name with in the group.
So my finals will be


.selector {
    /* Positioning */
    bottom: 0;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    z-index: 10;
   
    /* Display & Box Model */
    border: 10px solid #333;
    box-sizing: border-box;
    display: inline-block;
    height: 100px;
    margin: 10px;
    overflow: hidden;
    padding: 10px;
    width: 100px;
   
    /* Other */
    background: #000;
    color: #fff;
    font-family: sans-serif;
    font-size: 16px;
    text-align: right;
}


I have no plan to discuss about Line length here as its the baddest way, I think.

24 Hours of Australia - The Book

Sunday, August 3, 2014

On 2010 Feb 3rd, I have been to Brisbane city council library on the next week of my arrival, rather than talk about the library now I wish to mention about a a book. I have red, seen and heard about many books but I do remember some of them only. May be those are the ones impressed me, a lot.

I wish to make a record of a book here, 01.01.2000 – 24 Hours of Australia. This is a collection of photographs around thousand numbers by may be two hundred Australia's leading photographers. The specialty of the photos are they have been taken between mid-night 31 December 1999 to mid night of 1 January 2000, yes on the millennium day; the first day of this 20th century.

What an idea, its actually sponsored by Fuji Films. As you think it contains photos from party, fun, celebration, events, people, hope, diving, underwater, recreational activities and happiness. Although contains floods, accidents, deaths, injuries, eyes with expectation, a doctor on his way by an aircraft while speaking to the patient over the phone until he reach him as so many. Because for the nature it is just another day.

http://www.biblio.com/book/112000-24-hours-life-australia-j/d/647335447

A better way to show, Unfortunately Java script is disable in your Browser

Thursday, May 8, 2014

Introduction


For better user experience and for great user interface .. bla bla ...
Enabling JavaScript is A must on each websites.(period)

Scenario


Let me point out the issues on notifying the visitor to enable JavaScript if that is disabled on the current browser.
There are enough sites pop-up to guide you when you Google it.

But let me walk you through the tricks of handling it.

1. We should be able to place a text on the web page it self. as follows

Unfortunately JavaScript is disable in your Browser. We suggest you enable JavaScript for a better web experience.

2. But we need ti display this message only when the JavaScript is disabled

<noscript>
    Unfortunately Javascript is disable in your Browser. We suggest you enable java script for a better web experience.
</noscript>

3. Ok, where do we need to place this snip on the html. Yes, with in the <body>, But placing it at the top is not a good idea for SEO. So place it at the bottom, but before </body> tag.
4. But we need to hilight this piece of text and show up on the browser, here we need css to come in.
4.1 First lets add a <div > to the text
<noscript>
    <div id="noscript">
        Unfortunately Javascript is disable in your Browser. We suggest you enable Javascript for a better web experience.
    </div>
</noscript>

4.2 Now we need css to target #noscript to show up this.
#noscript {
    clear: both;
    left: 0;
    padding: 4px 10px;
    position: absolute;
    top: 0;
    width: 100%;
    z-index: 2000;
}


4.3 If I add some colours to this, then
#noscript {
    background: none repeat scroll 0 0 #000;
    clear: both;
    color: yellow;
    font-weight: bold;
    left: 0;
    padding: 4px 10px;
    position: absolute;
    text-align: center;
    top: 0;
    width: 100%;
    z-index: 2000;
}


5. Cool, but we need to hide this again if javascript is enabled, let use js to hide this when document is ready

<script>
    $(document).ready(function() {
        $('#noscript').hide();
    });
</script>


6. Enjoy

My Visual Studio 2008 Installation got broken : Fixed

Wednesday, January 15, 2014

Visual Studio 2008 is not working properly in my PC. Its show the message '{Project Name} could not be opened because the Microsoft Visual C# 2008 compiler not be created, Please re-install Visual Studio'.

I have tried as it is in http://connect.microsoft.com/VisualStudio/feedback/details/417251/cannot-create-new-projects-or-open-existing-projects, issue not solved. Yes, the command "devenv /resetskippkgs" works but not improvement on the VS2008.

So my next options is reinstall, but I have tried to reinstall / repair / Un-install  VS2008 ended up as following

Visual-Studio-2008-Repair-error
Visual-Studio-2008-Repair-error

Visual-Studio-2008-Uninstall-error
Visual-Studio-2008-Uninstall-error

Then, I was searching Microsoft tools and found the following which can un-install Visual Studio 2008 even when its failing with the standard uninstall option.

http://download.microsoft.com/download/5/3/3/533A214F-86D6-47DA-A052-7242F6B1A06D/sqlpubwizinstaller.exe