Search This Blog

Friday, May 24, 2013

Background Image with Full Screen in Browsers

 Welcome to Designers Dairy blog here i have posted How to make a  Background image in

full screen in browsers

Step1:

Create a Image with width size 1024 or more as u wish  

step2: 

Add these css code

   html
{
background: url(images/bg.jpg) no-repeat center center fixed;
 -webkit-background-size: cover;
 -moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}  

Step3 :

  It will Support in Browser like IE 9 and IE 10 , Firefox, Safari and    Google Chrome


 To Fix Background Image in Full Screen  Browsers7 and  IE 8 by

Calling the class in Image

 Step1:

 Add the css code  in Style sheet

 img.bg {
            /* Set rules to fill background */
            min-height: 100%;
            min-width: 1024px;
          
            /* Set up proportionate scaling */
            width: 100%;
            height: auto;
          
            /* Set up positioning */
            position: fixed;
            top: 0;
            left: 0;
        }
      
        @media screen and (max-width: 1024px){
            img.bg {
                left: 50%;
                margin-left: -512px; }
        }
       
Step 2:

Html Code :

</head>

<body>

  <img src="bg.jpg" width="1024" height="683" class="bg">

</body>



 To Fix Background Image in Full Screen  in  IE 8 by Calling the class in Div

 Step1:

 HTML CODE:

<div id="bg">
  <img src="images/bg.jpg" alt="">
</div>


 CSS :


#bg {
  position: fixed; 
  top: -50%; 
  left: -50%; 
  width: 200%; 
  height: 200%;
}
#bg img {
  position: absolute; 
  top: 0; 
  left: 0; 
  right: 0; 
  bottom: 0; 
  margin: auto; 
  min-width: 50%;
  min-height: 50%;
}
 
 

 To Fix Background Image in Full Screen  in  IE 7 use Java script

 Step1:
 
Html Code:
 
<img src="images/bg.jpg" id="bg" alt="">

Step: 2

Css:

#bg { position: fixed; top: 0; left: 0; }
.bgwidth { width: 100%; }
.bgheight { height: 100%; }
  
 
Step:3
 
Add these script in Head tag

 <script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>


 Script :

$(window).load(function() {   

    var theWindow        = $(window),
        $bg              = $("#bg"),
        aspectRatio      = $bg.width() / $bg.height();
                               
    function resizeBg() {
       
        if ( (theWindow.width() / theWindow.height()) < aspectRatio ) {
            $bg
                .removeClass()
                .addClass('bgheight');
        } else {
            $bg
                .removeClass()
                .addClass('bgwidth');
        }
                   
    }
                                  
    theWindow.resize(resizeBg).trigger("resize");

});


Friday, May 3, 2013

Html 5 Default Css and Js

HTML 5 :

Js:

http://code.google.com/p/html5shiv/


Default Css

* { margin: 0; padding: 0; outline: 0; }

body, html { height: 100%; }

body {
    font-size: 12px;
    line-height: 22px;
    font-family: verdana, arial, sans-serif;
    color: #727272;
    background: url(images/body-pattern.png) repeat 0 0;
    min-width: 100%;
}

/*font-family: 'Raleway', sans-serif;*/

a { color: #00acef; text-decoration: none; cursor: pointer; }
a:hover { text-decoration: underline; }
a img { border: 0; }

article, aside, details, footer, header, menu, nav, section { display: block; }
input, textarea, select { font-size: 12px; font-family: arial, sans-serif; }
textarea { overflow: auto; }

.cl { display: block; height: 0; font-size: 0; line-height: 0; text-indent: -4000px; clear: both; }
.notext { font-size: 0; line-height: 0; text-indent: -4000px; }
.left, .alignleft { float: left; display: inline; }
.right, .alignright { float: right; display: inline; }

Simple Php Login page with Database

Welcome to Designers Dairy blog here i have posted How to create a  Simple Php Login page

without Database

Step 1:  Create Login .html  and save

Login.html


<form action='logins.php' method='post'>

                  Username : <input type='text' name='username'> <br/>

                  Password : <input type='password' name='pass'> <br/>

                                       <input type='submit' value='Login'>

            </form>


Step 2: Create Login .php and save

Login.php

<?php

   //connecting to database

   $db = mysql_connect("localhost","root","") or die(mysql_error());


   //selecting our database

   $db_select = mysql_select_db("login", $db) or die(mysql_error());

   //Retrieving data from html form

  $username = $_POST['username'];

   $password = $_POST['pass'];




   //for mysql injection (security reasons)

   $username = mysql_real_escape_string($username);

   $password = mysql_real_escape_string($password);



   //checking if such data exist in our database and display result

   $login = mysql_query("select * from user where USERNAME = '$username' and

   PASSWORD = '$password'");

   if(mysql_num_rows($login) == 1) {

      echo "Login Successfull";
     
 header('Location: booked.html');
   

   }

   else {

      echo "Username and Password does not Match";

   }

?>


Step3 :  Have A fun.............!

Simple Php Login page without Database

Welcome to Designers Dairy blog here i have posted How to create a  Simple Php Login page

without Database

Step 1:  Create Login .html  and save

Login.html


<form action='logins.php' method='post'>

                  Username : <input type='text' name='username'> <br/>

                  Password : <input type='password' name='pass'> <br/>

                                       <input type='submit' value='Login'>

            </form>


Step 2: Create Login .php and save

Login.php


 <form action='login.php' method='post'>

                  Username : <input type='text' name='username'> <br/>

                  Password : <input type='password' name='pass'> <br/>

                                       <input type='submit' value='Login'>

            </form>


<?php

    $username = $_POST['username'];
    $password = $_POST['pass']; 

   if($username == 'admin')
 {

      echo "Login Successfull";
     
      header('Location: booked.html');    

   }

   else
 {

      echo "Username and Password does not Match";

   }

?>

Step3 :  Have A fun.............!

Monday, April 29, 2013

increase file size in wamp server to upload the images

 Welcome to Designers Dairy blog here i have posted How to increase  file size in wamp server to

upload the images

Step1:

Change the settings in C:\wamp\bin\apache\apache2.2.8\bin\php.ini

Find:
post_max_size = 8M
upload_max_filesize = 2M
max_execution_time = 30
max_input_time = 60
memory_limit = 8M

Change to:

post_max_size = 750M
upload_max_filesize = 750M
max_execution_time = 5000
max_input_time = 5000
memory_limit = 1000M

Then restart wamp to take effect


Have the Fun

Thursday, April 25, 2013

Changing the Localhost url to 8080


Step 1:

         Go to Wamp -> Open Wamp manager.in file

Step 2:

         Change everywhere localhost to - > localhost:8080

Type: submenu; Caption: "http://localhost:8080/phpmyadmin/"; SubMenu: alias_phpmyadmin; Glyph: 3
Type: submenu; Caption: "http://localhost:8080/sqlbuddy/"; SubMenu: alias_sqlbuddy; Glyph: 3
Type: submenu; Caption: "http://localhost:8080/webgrind/"; SubMenu: alias_webgrind; Glyph: 3


Step 3:

          Go to Wamp -> Open Wamp manager.tpl  file


       Change to everywhere localhost  - > localhost:8080

Type: item; Caption: "${w_localhost}"; Action: run; FileName: "${c_navigator}"; Parameters: "http://localhost:8080/"; Glyph: 5
Type: item; Caption: "${w_phpmyadmin}"; Action: run; FileName: "${c_navigator}"; Parameters: "http://localhost:8080/phpmyadmin/"; Glyph: 5


Step 4:

Exit the Wampserver and run


Sending the email from WAMP Server

This solution requires sendmail.exe (a Command Line Interface (CLI) executable which accepts email from PHP, connects to an SMTP server and sends email). You will not require to use it by command, don’t bother about it :-) Download the sendmail.zip and follow these steps:

Step1 : Download the Sendmail.zip file

Step2:  Create a folder named “sendmail” in “C:\wamp\”.

Step3:   Open the “sendmail.ini” file and configure it as following

              Change the Following codes

             1.   smtp_server = mail.mydomain.com  ->    smtp_server = smtp.gmail.com

             2.  smtp_port = 25 - > smtp_port = 465

             3. smtp_ssl=auto  -> smtp_ssl=ssl

             4. ;default_domain=mydomain.com -> default_domain=localhost

                                                            (remove the ‘ ;’  in default_domain to enable the code )

              5.  error_logfile = error.log

              6.   ;debug_logfile=debug.log -> Remove ; to enable

               7.   auth_username= [your_gmail_account_username]@gmail.com
                     auth_password= [your_gmail_account_password]
 
                8.  pop3_server=

                9.  pop3_username=

                10. pop3_password=

                 11. force_sender=

                 12 .force_recipient=

                 13. hostname=     ->  hostname =  localhost




Step4:

 Enable IMAP Access in your GMail’s Settings -> Forwarding and POP/IMAP -> IMAP Access:




  Step5:
          
 Enable “ssl_module” module in Apache server:





  Step6:  

 Enable “php_openssl” and “php_sockets” extensions for PHP compiler:



Step7:

Open php.ini from “C:\wamp\bin\apache\Apache2.2.17\bin” and configure it as following

 (The php.ini at “C:\wamp\bin\php\php5.3.x” would not work) (You just need to configure the last line in the following code, prefix semicolon (;) against other lines):

[mail function]
; For Win32 only.
; http://php.net/smtp
;SMTP =
; http://php.net/smtp-port
;smtp_port = 25

; For Win32 only.
; http://php.net/sendmail-from
;sendmail_from = you@domain.com
; For Unix only.  You may supply arguments as well (default: "sendmail -t -i").
; http://php.net/sendmail-path
sendmail_path = "C:\wamp\sendmail\sendmail.exe -t -i"
 

Step8:

  Restart WAMP Server.

And Check mail  will be go smoothly

 

 

Validating to select in sequencial order using angular

    < input type = "checkbox" (change) = "handleSelectTaskItem($event, taskItem)" [checked] = " taskItem . i...