Thursday, July 30, 2015

custom fonts using css?

Some new websites that are using custom fonts on their sites (other than the regular Arial,Tahome).
Generically, you can use a custom font using @font-face in your CSS.

Here's a very basic example

@font-face {
font-family: 'YourFontName'; /*a name to be used later*/
src: url('http://domain.com/fonts/font.ttf'); /*URL to font*/
}
.classname {
font-family: 'YourFontName';
}
/* (.classname is your selector in your project ). */
/* ----------------- DEMO CODE *************** */
@font-face {
font-family: 'openSans';
src:url('../fonts/OpenSans-Regular_1.ttf'); }
@font-face {
font-family: 'openSansLight';
src:url('../fonts/OpenSans-Light_1.ttf'); }
*
{
margin:0px;
padding:0px;
}
body
{
font-family:"openSans";
color:#4f4f4f;
font-size:100%;
background-color:#F3f3f3;
}
h1{
font-family:"openSansLight";
color:#4f4f4f;
}
view raw font-style.css hosted with ❤ by GitHub


Link for download good Font  


fontsquirrel.com 

Google Fonts



I hope that helped!

NOTE :


our font is cross-browser compatible, make sure that you use this syntax:

@font-face {
    font-family: 'Comfortaa Regular';
    src: url('Comfortaa.eot');
    src: local('Comfortaa Regular'), 
         local('Comfortaa'), 
         url('Comfortaa.ttf') format('truetype'),
         url('Comfortaa.svg#font') format('svg'); 
}
 
 
 

Wednesday, July 22, 2015

Remove Index.php From URL in CodeIgniter

How To Remove Index.php From CodeIgniter in Windows Xampp

Follow This Step
1. First check mod_rewrite is enabled or not
2. To check this create php file type in that

<?php
phpinfo(); // Show PHP information
?>
view raw phpinfo.php hosted with ❤ by GitHub


3. Run into browser
4. Search for the mod_rewrite if you will find that in loaded module then its enabled else you have to enabled this mod_rewrite
5. After that create .htaccess file in your root folder of codeigniter
6. Copy this below codeand paste into that .htaccess file
RewriteEngine On
RewriteCond $1 !^(index\.php|resources|robots\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L,QSA]
view raw .htaccess hosted with ❤ by GitHub


7. After that change into the config.php of codeigniter

$config['index_page'] = 'index.php';    
    to      
 $config['index_page'] = ' ';                 

8. Here you done now run the file with index.php using url http://localhost/ci/welcome



-----------------------------------------------------------------------------------------------
you would also like 

 Interview Question [PHP] 

How to create JSON using MySql Database [PHP]




How to Host a Laravel Project on Hostinger’s hPanel: A Step-by-Step Guide

How to Host a Laravel Project on Hostinger’s hPanel: A Step-by-Step Guide If you're looking to host a Laravel project on Hostinger’s hPa...