Showing posts with label CSS. Show all posts
Showing posts with label CSS. Show all posts

Wednesday, August 10, 2016

Complete index page including Bootstrap, FontAwesome and jQuery

Just add the following code to your index page and you are ready to use all the functionalities of Bootstrap, FontAwesome and jQuery

 <!DOCTYPE html>  
 <html>  
   <head>  
    <title> </title>  
    <!-- Favicon Start -->  
    <link rel="icon" type="image/png" href="resources/images/favicon.png" />  
    <!-- Favicon End -->  
    <!-- Meta Tags Start -->  
    <meta name="viewport" content="width=device-width, initial-scale=1">  
    <!-- Mobile First -->  
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">  
    <!-- Mobile First -->  
    <!-- Meta Tags Start -->  
    <!-- Latest compiled and minified CSS Start -->  
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">  
    <!-- Latest compiled and minified CSS End -->  
    <!-- Optional theme Start -->  
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous">  
    <!-- Optional theme End -->  
    <!-- JQuery UI CSS Start -->  
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.0/jquery-ui.min.css">  
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.0/jquery-ui.theme.css">  
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.0/jquery-ui.structure.min.css">  
    <!-- JQuery UI CSS End -->  
    <!-- Sticky Footer Basic CSS Start -->  
    <style>  
      /* Sticky footer styles  
      -------------------------------------------------- */  
      html {  
      position: relative;  
      min-height: 100%;  
      }  
      body {  
      /* Margin bottom by footer height */  
      margin-bottom: 60px;  
      }  
      .footer {  
      position: absolute;  
      bottom: 0;  
      width: 100%;  
      /* Set the fixed height of the footer here */  
      height: 60px;  
      background-color: #f5f5f5;  
      }  
      /* Custom page CSS  
      -------------------------------------------------- */  
      /* Not required for template or sticky footer method. */  
      .container {  
      width: auto;  
      max-width: 680px;  
      padding: 0 15px;  
      }  
      .container .text-muted {  
      margin: 20px 0;  
      }  
    </style>  
    <!-- Sticky Footer Basic CSS End -->  
    <!-- JQuery Start -->  
    <script src="http://code.jquery.com/jquery-3.1.0.min.js"></script>  
    <!-- JQuery End -->  
    <!-- JQuery UI Start -->  
    <script src="http://code.jquery.com/ui/1.11.4/jquery-ui.min.js"></script>  
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.0/external/jquery/jquery.min.js"></script>  
    <!-- JQuery UI End -->    
    <!-- FontAwesome JavaScript Start -->  
    <script src="https://use.fontawesome.com/d639cd4fa4.js"></script>  
    <!-- FontAwesome JavaScript Start -->  
    <!-- Latest compiled and minified JavaScript Start -->  
    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>  
    <!-- Latest compiled and minified JavaScript Start -->  
   </head>  
   <body>  
    <!-- Navigation Areas -->  
    <nav class="navbar navbar-default" role="navigation">  
      <!-- Main Navigation Start -->  
      <div class="container">  
       <!-- Navigation Container Start -->  
       <ul class="nav navbar-nav">  
         <li><a href="#">Home</a></li>  
         <li><a href="#">About Us</a></li>  
         <li><a href="#">FAQ</a></li>  
         <li><a href="#">Contact</a></li>  
       </ul>  
      </div>  
      <!-- Navigation Container End -->  
    </nav>  
    <!-- Main Navigation End -->  
    <h1><i class="fa fa-university" aria-hidden="true"></i>This is without Bootsrap!</h1>  
    <!-- Footer Areas -->  
    <footer class="footer">  
      <!-- Footer Start -->  
      <div class="container">  
       <!-- Footer Container Start -->  
       <p class="text-muted">Place sticky footer content here.</p>  
      </div>  
      <!-- Footer Container End -->  
    </footer>  
    <!-- Footer End -->  
   </body>  
 </html>  
Share:

Saturday, August 6, 2016

Use CSS To Work With Background Images

Use CSS To Work With Background Images


In order to do this you can easily use CSS for your websites. Here is the example CSS code to apply those effects. If you play with this you can achieve your goal according to your's need.

1. Overlay the image

Apply image overlay on background image with the following concept

 .darken {  
 background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)),url(YOUR IMAGE HERE);  
 }  

Example

This is just a simple example which you can do change in according to your need.

HTML

 <div class="test">  
   <p>Beautiful image with dark overlay</p>  
 </div>  

CSS

 .test {  
   width: 500px;  
   height: 400px;  
   background-size: cover;  
   background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5) ), url("https://download.unsplash.com/photo-1428604467652-115d9d71a7f1");  
   position: relative;  
 }  
 .test p {  
   font-size: 23px;  
   color: #fff;  
   text-transform: uppercase;  
   font-family: sans-serif;  
   position: absolute;  
   top: 160px;  
   left: 22px;  
 }  

2. Put text in a box

Apply text in a box above background image with the following concept
Note: The image fades towards black at the bottom, with white text written over it
 .text-box {  
 background-color: rgba(0, 0, 0, 0.5);  
 color: #fff;  
 display: inline;  
 padding: 10px;  
 }  

Example

This is just a simple example about text in a box

HTML

 <div class="test">  
   <p>Beautiful image with some text in a box</p>  
 </div>  

CSS

 .test {  
   width: 500px;  
   height: 400px;  
   background-size: cover;  
   position: relative;  
   background-image: url("https://download.unsplash.com/photo-1428604467652-115d9d71a7f1");  
 }  
 .test p {  
   background-color: rgba(0,0,0,0.6);  
   color: #fff;  
   display: inline;  
   padding: 10px;  
   font-size: 30px;  
   color: #fff;  
   text-transform: uppercase;  
   font-family: sans-serif;  
   width: 440px;  
   position: absolute;  
   top: 120px;  
   left: 20px;  
 }  

3. Floor fade

With this Floor fade effect you can put the text over image in the background. This effect is normally used in many latest websites. 
 .floor-fade {  
 background: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.6) ), url(YOUR IMAGE HERE);  
 }  

Example

Here is the simple example of Floor fade effect.

HTML

 <div class="test">  
   <p>Beautiful image with floor fade</p>  
 </div>  

CSS

 .test {  
   width: 500px;  
   height: 400px;  
   background-size: cover;  
   background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.6) ), url("https://download.unsplash.com/photo-1428604467652-115d9d71a7f1");  
   position: relative;  
 }  
 .test p {  
   font-size: 24px;  
   color: #fff;  
   text-transform: uppercase;  
   font-family: sans-serif;  
   position: absolute;  
   bottom: 10px;  
   left: 25px;  
 }  
Share:

Monday, July 4, 2016

How to use Font Awesome in you Design

How to use Font Awesome in you Design?

This post is about how we can use the Font Awesome in our design. Now a day the technology get change. If you want any training video we do not know how we can implement it.
This post will help you in that case.
If you want to use the Font-Awesome here is the simple Example.
1. Fist thing that you need is to include the BootstrapCDN for FontAwesome  in the <head> tag of you HTML page i.e.
 <head>  
 <link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous">  
 </head>  
After that the FontAwesome CDN will start working on you HTML page. 
Then you need to add the element to your HTML page, where you want to display the FontAwesome on your page.
For Example we used here the <p1></p1> to display the FontAwesome on our HTML page. <p1></p1> is the elements. We can also use <element></element> or anything text you want.
Then you can display it with your CSS, for example here if the elements are <p1></p1> then by CSS we can display it by following CSS come.
 .p1 {  
   position: relative;  
 }  
 /*replace the content value with the  
 corresponding value from the list below*/  
 .p1:before {  
   content: "\f000";  
   font-family: FontAwesome;  
   font-style: normal;  
   font-weight: normal;  
   text-decoration: inherit;  
 /*--adjust as necessary--*/  
   color: #000;  
   font-size: 18px;  
   padding-right: 0.5em;  
   position: absolute;  
   top: 10px;  
   left: 0;  
 }  
In my case you can use it like that
 p1 {  
  position:relative;  
  }  
  p1:before {  
  font-family:FontAwesome;  
  content: "\f009";  
  text-align:center;  
  font-size:100px;  
  display:block;  
   }  

By this way the Font Awesome will work correctly.
Share:

Contact Form

Name

Email *

Message *