Sunday, May 18, 2014

View/test website without domain using cpanel

Sometime we need to check/test our website before pointing a domian name (before configuring DNS).
Here is the solution to check site.

1. Login to cpanel (some hosting company use their company url to access cpanel or some company give temporary IP/url to access cpanel.).

2. After login check the  "IP Address"(Most of time you'll find left side in cpanel).

3. Find "Home directory" (Most of time you'll find left side in cpanel).
It'll look like "/home/username of cpanel" and copy the "username"

4. Now in a browser past that IP address(or your hosting company url)/~username
Example   http://123.45.678.90/~username
Or Example  http://yourhostingcompany.com/~username

It should work.try yourself and let me know.
Thank

Saturday, May 17, 2014

Random /dynamic Background Image

Using this code we can using random background image.Also using this way we can use other CSS in dynamic way .

<?php
  $bg = array('bg-01.jpg', 'bg-02.jpg', 'bg-03.jpg', 'bg-04.jpg', 'bg-05.jpg', 'bg-06.jpg', 'bg-07.jpg' ); // we can  insert as many file as we want

  $i = rand(0, count($bg)-1);
  $selectedBg = "$bg[$i]";
?>

background: url(images/<?php echo $selectedBg; ?>) no-repeat;

we can use this as inline css link

<header class="page-header" style="background-image: url('images/<?php echo $selectedBg; ?>');">

Thanks

Tuesday, April 22, 2014

Marquee start or stop on mouse hover works both chrome firefox

If you want to use marquee tag and want to pause or stop when you'll hover your mouse

<marquee 
face="courier"
behavior="SCROLL"
onmouseout="this.setAttribute('scrollamount', 2, 0);this.start();"
onmouseover="this.setAttribute('scrollamount', 0, 0);this.stop();"
scrollamount="2"
direction="up"
style="text-align: left;"
>
here is my text
</marquee>
 
Hope you'll enjoy a great in your work

Thanks

Total Pageviews