GITHUB

Git Commands

Git Commands :

To know the status of the GIT
git status

To know the difference of the GIT
git diff <filename>

To add file to commit
– git add <filename>

To create local shelveset
git commit – m “message”

To push on git server
git push origin <branchname>

To check the branch
git branch

To change the branch
git checkout <branchName1>

To merge branchName1 into branchName2
git merge <branchName2>

To check system specific change : [ shelveset ]
git stash

abc.txt —

abc.txt — d

git stash

git pull origin <branch-name>

git stash apply

git reset HEAD

git status

git diff abc.txt

Standard
CSS

CSS extensions do not matter to attach or import the CSS file in HTML


I was making a R&D for the attaching the CSS file to HTML document
I found that there is no need to add specific extension (.css) to to the CSS file
But you have to must declare type of document and relations between your file and HTML document

For example:

<link href=”stylesheet.satish” rel=”stylesheet” type=”text/css” />

Instead of

<link href=”stylesheet.css” rel=”stylesheet” type=”text/css” />

Try this

Standard
CSS, HTML

margin bottom not working?

I was scripting div with margin bottom 10px for holding h3 & h3 has margin bottom of 10px but that is not getting display in IE & Mozilla

I make R&D lot finally found that my outer div also have margin botton
conclusion: margiin bottom is not work withim margin bottom

Standard
CSS

Borders in CSS3

In CSS3 border attribute have a lot of option do design it
in below example there are 8 types of different colors to a single block

.borderColor{
border:8px solid #000000; /*as we taken width 8px; we can give 8 different color values */
/*you must define border-top, border-right, border-bottom, and border-left separately to get the effect below.*/
-moz-border-top-colors:#bc0909 #10ca49 #bbca10 #753705 #056975 #b90dcd #f60aff #662b68;
-moz-border-right-colors:#bc0909 #10ca49 #bbca10 #753705 #056975 #b90dcd #f60aff #662b68;
-moz-border-bottom-colors:#bc0909 #10ca49 #bbca10 #753705 #056975 #b90dcd #f60aff #662b68;
-moz-border-left-colors:#bc0909 #10ca49 #bbca10 #753705 #056975 #b90dcd #f60aff #662b68;
width:300px;
height:100px;
background:#CCCCCC;
padding:15px;
margin-left:20px;
}

Standard
CSS, HTML

Colors & opacity in CSS3

In CSS3 there are very easy to steps to increase or decrease the opacity of an object by simple methos

.opacity{
background:rgba(0, 54, 105, .5); /*RGBA:RED, GREEN, BLUE, LEVEL OF OPACITY*/
/*background:rgba(red, green,blue, level of opaity)*/
width:200px;
height:200px;
margin:20px;
color:#000000;
padding:15px;
}

.hslColor{ /*HSL stand for Hue saturation & lightness*/
background-color: hsl(209,41.2%, 20.6%);
}

Standard
CSS

Drop shadow through CSS3

There is an little bit confusion generally we call it as drop shadow but in css3 there is an attribute named as BOX-SHADOW


/* Css for box shadow */

#dropShadow{
box-shadow:#333 3px 3px 4px;
/*box-shadow:color of shadow axis of shadow amount of blurr amount of spread blurr */
-moz-box-shadow:3px 3px 4px #333;
-webkit-box-shadow:#333 3px 3px 4px;
width:200px;
padding:7px;
height:100px;
background:#993300;
margin:10px;
}

/* css for box shaow */

#boxShadow{
-moz-box-shadow:3px 3px 4px #333333;
-webkit-box-shadow:#333 3px 3px 4px;
background-color:#006699;
color:#FFFFFF;
height:100px;
margin-left:50px;
padding:0 7px;
width:550px;
}

Standard
CSS

CSS3 text selection

This is exact what i finding the solution for text selection from last 2-3 months


/*Css for text selection*/
::selection{
background:#006699;
color:#FFFFFF;
}

/* special for mozilla */

::-moz-selection{
background:#006699;
color:#FFFFFF;
}

Standard
CSS

Is CSS case sensitive?

Cascading Style Sheets (CSS) is not case sensitve. However, font families, URLs to images, and other direct references with the style sheet may be.

The trick is that if you write a document using an XML declaration and an XHTML doctype, then the CSS class names will be case sensitive for some browsers.

It is a good idea to avoid naming classes where the only difference is the case, for example:

div.myclass { …}
div.myClass { … }

If the DOCTYPE or XML declaration is ever removed from your pages, even by mistake, the last instance of the style will be used, regardless of case.

for more http://webdesign.about.com/od/css/f/blcssfaqcase.htm

Standard
Internet Explorer

Explorer 6 Duplicate Characters Bug

Complex layouts can trigger a bug where the last few characters of a floated element can appear on the cleared element below. There are several solutions; few are ideal and a little trial and error will be required:

* ensure all floated elements use display:inline;
* use a margin-right:-3px; on the last floated element
* use a conditional comment as the last item in the floated element, i.e. <!–[if !IE]>Put your commentary in here…<![endif]–>
* use an empty div in the last element of the container (it can also be necessary to set the width to 90% or similar)

Explorer 6 Duplicate Characters Bug  this is common problem which every designer face

there are some reason because of which it occurs

  • in your code there is an extra comments (HTML comments  to guide code for)
  • your floating is not clear by CSS

you can avoid this by

  • clearing your all divs by CSS
  • remove extra comments from code
  • put 2-3 divs around affected divs
Standard
CSS, HTML

Absolute div in a floated div

While we use an absolute in a all floated structure it gives some issues like
His position changes accordingly screen resolution
To avoid such error
We can use position relative
Like this
Keep your wrapper always relative


#wrapper{
width:100%;
height:100%;
position:relative;
left:0px;
top:0px;
}

#yourDiv{
position:absolute;
left:20px;
top:15px;
width:200px;
height:200;
background:#ff0000;
}

Standard
CSS, HTML

sample html5 structure

here is the sample html 5 structure. here are some attribute of html 5

<!doctype html>
<html lang="en">
<head>
<title>The Flower Blog</title>
</head>
<body>
<header> </header>
<nav> </nav>
<section id="intro">
<header> </header>
</section>
<section>
<article>
<header></header>
</article>
</section>
<section id="comments">
<h3></h3>
<article>
<header>
<time datetime="2009-06-29T23:35:20+01:00">June 29th 2009 at 23:35</time>
</header>
<p></p>
</article>
<article>
<header>
<time datetime="2009-06-29T23:40:09+01:00">June 29th 2009 at 23:40</time>
</header>
</article>
<article>
<header> </header>
</article>
</section>
<form action="#" method="post">
<h3></h3>
<p>
<label for="name">Name</label>
<input name="name" id="name" type="text" required />
</p>
<p>
<label for="email">E-mail</label>
<input name="email" id="email" type="email" required />
</p>
<p>
<label for="website">Website</label>
<input name="website" id="website" type="url" />
</p>
<p>
<label for="comment">Comment</label>
<textarea name="comment" id="comment" required></textarea>
</p>
<p>
<input type="submit" value="Post comment" />
</p>
</form>
<aside>
<section>
<header>
<h3></h3>
</header>
</section>
<section>
<header>
<h3></h3>
</header>
</section>
</aside>
</div>
<footer>
<section id="about">
<header>
<h3></h3>
</header>
<p></p>
</section>
<section id="blogroll">
<header>
<h3></h3>
</header>
</section>
<section id="popular">
<header>
<h3></h3>
</header>
</section>
</footer>
</body>
</html>

Standard