Gyancode

A free library of HTML, CSS, JS

Search This Blog

Monday 28 November 2016

Style a Select Box

<!DOCTYPE html>
<html>
<style>
select {
    border: 1px #ddd solid;
    color: #333;
    background: #f6f6f6;
    font-weight: bold;
    width: 300px;
    -webkit-appearance: none;
    font-size: 14px;
    padding: 10px;
    border-radius: 5px;
}
</style>
<body>
<select>
    <option>Select an Option</option>
    <option>Option 1</option>
    <option>Option 2</option>
  </select>
</body>

</html>

Odd Even Css

<style type="text/css">
ul li{padding:10px 30px;}
ul li:nth-child(even) {background: #CCC}
ul li:nth-child(odd) {background: #FFF}
</style>

<body>
<ul>
  <li></li>
  <li></li>
  <li></li>
  <li></li>
  <li></li>
  <li></li>
  <li></li>
  <li></li>
  <li></li>
</ul>

</body>

Saturday 19 November 2016

Css Only for Mozilla Browser

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Css Only for Mozilla Browser</title>
<style type="text/css">
h1{ color:#00F3FF;}
@-moz-document url-prefix() {
    h1 { color: red; }
}
</style>
</head>

<body>
<h1>Demo Test Demo Test</h1>
</body>
</html>

Using @import css

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="EN" dir="ltr">
<head>
<title>Using @import css</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

<style type="text/css">
@import url("style.css");
</style>

</head>

<body>
</body>

</html>

Bootstrap Multiselect

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Bootstrap Multiselect</title>
</head>
<body>
<script type="text/javascript" src="js/jquery.min.js"></script>
<link href="css/bootstrap.min.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="js/bootstrap.min.js"></script>
<link href="css/bootstrap-multiselect.css" rel="stylesheet" type="text/css" />
<script src="js/bootstrap-multiselect.js" type="text/javascript"></script>
<script type="text/javascript">
$(function () {
$('#multi').multiselect({
includeSelectAllOption: true
});

});
</script>
<select id="multi" multiple="multiple">
  <option value="1">Mango</option>
  <option value="2">Apple</option>
  <option value="3">Banana</option>
  <option value="4">Guava</option>
  <option value="5">Orange</option>
</select>
</body>
</html>

Wednesday 16 November 2016

Quick Responsive Photo Gallery

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
    <meta charset="utf-8" />
    <title>Quick photo Gallery</title>
  
    <script type="text/javascript" src="http://code.jquery.com/jquery-1.7.1.min.js"></script>
    <link rel="stylesheet" href="style.css">
    <script src="modernizr.js"></script>
</head>
<body>

        
<div class="provider_content shadow margin">
          <div class="m-p-g">
              <h3 class="title">Photos</h3>
              <div class="m-p-g__thumbs" data-google-image-layout data-max-height="350">
                  <div class="grid"><img src="post.jpg" data-full="post.jpg" alt="1" /></div>
                  <div class="grid"><img src="post.jpg" data-full="post.jpg" alt="1" /></div>
 <div class="grid"><img src="post.jpg" data-full="post.jpg" alt="1" /></div>
 <div class="grid"><img src="post.jpg" data-full="post.jpg" alt="1" /></div>
 <div class="grid"><img src="post.jpg" data-full="post.jpg" alt="1" /></div>
 <div class="grid"><img src="post.jpg" data-full="post.jpg" alt="1" /></div>
              </div>
              <div class="m-p-g__fullscreen"></div>
          </div>

      </div>
        <script src="jquery.poptrox.min.js"></script>
<script>
var elem = document.querySelector('.m-p-g');
document.addEventListener('DOMContentLoaded', function() {
var gallery = new MaterialPhotoGallery(elem);
});
</script>
</body>
</html>
DONWLOAD

CSS Gradient

background: #1e5799; /* Old browsers */
background: -moz-linear-gradient(top,  #1e5799 0%, #2989d8 50%, #207cca 51%, #7db9e8 100%); /* FF3.6-15 */
background: -webkit-linear-gradient(top,  #1e5799 0%,#2989d8 50%,#207cca 51%,#7db9e8 100%); /* Chrome10-25,Safari5.1-6 */
background: linear-gradient(to bottom,  #1e5799 0%,#2989d8 50%,#207cca 51%,#7db9e8 100%); /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#1e5799', endColorstr='#7db9e8',GradientType=0 ); /* IE6-9 */

Saturday 12 November 2016

Right arrow with before after css

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Right arrow with before after css</title>
</head>
<style>
.left-box { background: #27aae0; color: #fff; padding: 10px 15px; position: relative; margin: 10px 0px;  border-radius: 9px; width: 440px; float: left;}
.left-box h5 { font-size: 20px; margin:0px;}
.left-box p { font-size: 14px;}
.left-box:after {bottom: 100%; left: 28%; border: solid transparent; content: " "; height: 0; width: 0; position: absolute; pointer-events: none;   border-color: rgba(213,222,227,0); border-width: 11px; margin-left: 21em; border-left-color: #27aae0; top: 20px;}
</style>
<body>
<div class="left-box">
<h5>Is your website shunning your customers away?</h5>
<p> Does your customers on an ecommerce website come and abandon from buying in your website. Do they just leave and buy the same product from a competitor website then for sure you need to relook at your website usability design.</p>
</div>
</body>
</html>

Project Counter

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Project Counter</title>
</head>
<style>
.count{ display: inline-block; margin:10px 0; width:100%;}
.count .single{width: 20%;float: left;padding: 4% 3% 2% 3%;margin: 2.5%;height: 230px;border: 5px #FFFFFF solid;border-radius: 50%;text-align: center;}
.count .single .counter {font-size: 48px;color: #FFFFFF;display: inline-block;font-weight: bold;text-align: center;}
.count .single span{ font-size:30px; color:#FFFFFF;}
.count .single h3{color:#FFFFFF;line-height: 24px; font-size:18px; font-weight:bold;}
.count .counter > span {margin-bottom: 0;}
.circle {background: #2980b9;width: 200px;line-height: 200px;display: inline-block;color: #fff; border-radius: 100%;}
</style>
<body>
<div class="count">
<div class="single" style="background-color:#833292;"><div class="counter">80</div><span>%</span><h3>Repeat Customers</h3></div>
<div class="single" style="background-color:#f8622f;"><div class="counter">350</div><span>+</span><h3>E-Commerce Portals</h3></div>
<div class="single" style="background-color:#0674a5;"><div class="counter">2000</div><span>+</span><h3>Website Projects</h3></div>
<div class="single" style="background-color:#dc2889;"><div class="counter">13</div><span>+</span><h3>Years of Experience</h3></div>
</div>
</body>
</html>

News Ticker Vertical

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>News Ticker Vertical</title>
</head>
<style>
.newstape {color: #999999; height: 419px; overflow: hidden;}
.newstape .newstape-content {position: relative;}
.newstape .newstape-content .news-block{ margin-bottom:20px;}
.newstape .newstape-content .news-block .test{ color:#999999; font-size:16px; font-family:Calibri; margin:0px;}
.newstape .newstape-content .news-block .name{ color:#f83e4e;  text-align:left; margin:0px;}

</style>
<script src="js/jquery.min.js"></script>
<script type="text/javascript">  
    $(function() {
        $('.newstape').newstape();
    });
</script>

<body>
<div class="newstape">
  <div class="newstape-content">
    <div class="news-block">
      <p class="test"> Lorem Ipsum is simply dummy text of the printing and typesetting industry. </p>
      <div class="name">- Lorem Ipsum</div>
    </div>
    <div class="news-block">
      <p class="test"> Lorem Ipsum is simply dummy text of the printing and typesetting industry. </p>
      <div class="name">- Lorem Ipsum</div>
    </div>
    <div class="news-block">
      <p class="test"> Lorem Ipsum is simply dummy text of the printing and typesetting industry. </p>
      <div class="name">- Lorem Ipsum</div>
    </div>
    <div class="news-block">
      <p class="test"> Lorem Ipsum is simply dummy text of the printing and typesetting industry. </p>
      <div class="name">- Lorem Ipsum</div>
    </div>
  </div>
</div>
</body>
</html>