Tuesday, December 13, 2011

css3 Backgroound in gradient

In mostly in simple background gives this style 
 [background:#dddddd;]

In Mozilla browser use this css
[ background: -moz-linear-gradient(top, #ffffff 0%, #666666 100%); ]

In Chrome,Safari4+ browser use this css
[ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ffffff), color-stop(100%,#666666)); ] 


In Opera 11.10+ browser use this css
[ background: -o-linear-gradient(top, #ffffff 0%,#666666 100%); ] 

In IE10+ browser use this css
[ background: -ms-linear-gradient(top, #ffffff 0%,#666666 100%);]
 
In Default browser use this css

Wednesday, November 23, 2011

margin, padding,, border

As you may have guessed, the margin property declares the margin between an (X)HTML element and the elements around it.
The margin property can be set for the top, left, right and bottom of an element. (see example below)

  margin-top: length percentage or auto;
  margin-left: length percentage or auto;
  margin-right: length percentage or auto;
  margin-bottom: length percentage or auto;

As you can also see in the above example you have 3 choices of values for the margin property

    length
    percentage
    auto

You can also declare all the margins of an element in a single property as follows:

  margin: 10px 10px 10px 10px;

If you declare all 4 values as I have above, the order is as follows:

    top
    right
    bottom
    left

If only one value is declared, it sets the margin on all sides. (see below)

  margin: 10px;

If you only declare two or three values, the undeclared values are taken from the opposing side. (see below)

  margin: 10px 10px; /* 2 values */
  margin: 10px 10px 10px; /* 3 values */

You can set the margin property to negative values. If you do not declare the margin value of an element, the margin is 0 (zero).

  margin: -10px;

Elements like paragraphs have default margins in some browsers, to combat this set the margin to 0 (zero).

  p {margin: 0;}

Note: You do not have to add px (pixels) or whatever units you use, if the value is 0 (zero).

You can see in the example below, the elements for this site are set to be 20px (pixels) from the body

body{
  margin: 20px;
  background: #eeeeee;
  font-size: small;
  font-family: Tahoma, Arial, "Trebuchet MS", Helvetica, sans-serif;
  text-align: left;
}

Saturday, October 29, 2011

CSS BOX SHADOW

.shadow {
  -moz-box-shadow: 5px 5px 5px #ccc;
  -webkit-box-shadow: 5px 5px 5px #ccc;
  box-shadow: 5px 5px 5px #ccc;
} 
  1. The horizontal offset of the shadow, positive means the shadow will be on the right of the box, a negative offset will put the shadow on the left of the box.
  2. The vertical offset of the shadow, a negative one means the box-shadow will be above the box, a positive one means the shadow will be below the box.
  3. The blur radius, if set to 0 the shadow will be sharp, the higher the number, the more blurred it will be.
  4. Color
 

Inner Shadow

.shadow {
   -moz-box-shadow:inset 0 0 10px #000000;
   -webkit-box-shadow:inset 0 0 10px #000000;
   box-shadow:inset 0 0 10px #000000;
}

शेवटी मैत्रीचं प्रेम ..

मानलं कि मी बावळट आहे ... पण इतकं पण नाही कि शून्य आहे ... गणित भले कच्च असेल माझं ... पण इतिहास माझा पक्का आहे ... रुसणं-फुगणं जमतंय ...