BOX SHADOW using CSS3

Its very easy to drop shadow of different elements on a web-page using box-shadow feature of CSS3. Following is the example showing how to use box shadow for dropping shadow …

 

1) DROPPING SHADOW OUTSIDE THE BOX

box-shadow: h-shadow v-shadow blur spread color;

 

-> If h-shadow and v-shadow are set to 0 , shadow is speard equally in all directions.

-> If h-shadow is positive , shadow will move towards right and in similar way if v-shadow is positive, shadow will be more towards bottom.

-> If h-shadow and v-shadow are negative , then shadow would be more towards left and top respectively…

 

 

box_shadows1

2) DROPPING SHADOW INSIDE THE BOX
For dropping shadows inside the box, just use “inset” at the end…

box-shadow: h-shadow v-shadow blur spread color inset;

box_shadows2

 

Read More

TEXT SHADOW using CSS3

In this post you’ll come to know about how to drop text shadow on a web page using text-shadow.

Format:
 
text-shadow: h-shadow v-shadow blur color;
 
-> h-shadow ; position of horizontal shodow
-> v-shadow ; position of vertical shodow
-> blur ; blur spread, or blur distance
 
If h-shadow is positive, shadow will move towards right and if v-shadow is positive, shadow will move towards bottom of text and vice-versa.
  •  If h-shadow and v-shadow are set to 0, shadow of text will be in all directions around text on which text-shadow property is applied.
  • If h-shadow and v-shadow are set to positive value, shadow of text will be towards right and bottom of text.

 

Examples:

 

Output:

text-shadow image

 

Read More

GET DAY FROM DATE IN PHP

It is very simple to find or get day from date in php. This posts shares very simple example of how to get day from date or week-day from date-time using PHP. Covert date-time string to time and use date function as mentioned in the following code chunk

 

 

Read More

SUBTRACT TIME FROM DATE in PHP

If you want to subtract time from the date, it is very simple in PHP.
There exist number of ways to subtract time in PHP. Following codes chunks shows how you can subtract time from date or date-time in PHP.

 

 

Read More

PING IP AND PORT USING PHP

This post describes how easily you can test the connectivity or ping ip and port using PHP. Function to be used is fsocketopen .

Function prototype is follows:

fsocketopen(host, port, errorno, errorstr, wait_timeout_in_seconds)

 

 

Read More