Sunday, 21 October 2018

I most liked Box shadow like this

  1. div{box-shadow: 0 0 1px rgba(0, 0, 0, 0.15);
  2.     margin: 0 7.6923%;}





Wednesday, 20 June 2018

Embeding video repsonsive in html page

How do responsive in embeded video in html page

  1. Embed video code from youtube or anywhere
  2. HTML code is below
  3. CSS code is below
Just change your video path only everything tested, working perfectly.

<div class="main-video-container">
                <div class="myvideowraper">
                    <!-- Copy & Pasted from YouTube -->
                            <iframe width="764" height="429" src="videoembedcodehere" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
                </div>
</div>
                                         

<style type="text/css">


/* Embeded video responsive */
.myvideowraper {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 */
  padding-top: 0px;
  height: 0;
}
.myvideowraper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* End video responsive */


.main-video-container{ max-width:  767px !important; overflow-x: hidden; margin:0px auto; }

 @media only screen and (max-width:1366px) {
.main-video-container{ max-width:  767px !important; overflow-x: hidden; margin:0px auto; }
}



/* flex box css */

.mainsection-items{flex-direction:row; display: flex; align-items: center; justify-content: center; min-height: 200px; height: 100%;  border: solid 1px #ccc }
.box1{ width: 33.3%; }
</style>   
 

Friday, 19 January 2018

Array data display in list / span Array with id for single items


Array data display in list / span
Array with id for single items

<h2>JavaScript Arrays</h2>

<p id="demo"></p>

<script>
n = 0;
var cars = ["Saab", "Volvo", "BMW"];

var str = "";
for (var i = 0; i < cars.length; i++)
{
n = n + 1;
str = str + "<span id='" + n +"'>this car is:" + cars[i] + "</span><br>";

//str += "<li>" + cars[i] + "</li>";

//document.write("this car name is :" + cars[i] + "<br>");
 }

document.getElementById("demo").innerHTML = str;

</script>


Tuesday, 31 October 2017

Text align left, right & center in single line

HTML
<div class="col-md-12 all-results-info">
            <span class="text-alignleft">87 results found</span>
            <span class="text-aligncenter">87 results found</span>
            <span class="text-alignright">Filter Results <i class="fa fa-filter" aria-hidden="true"></i>
</span>
         </div>

CSS

 .text-alignleft {
    float: left;
    text-align:left;
    width:33.33333%;
}
.text-aligncenter {
    float: left;
    text-align:center;
    width:33.33333%;
}
.text-alignright {
    float: left;
    text-align:right;
    width:33.33333%;
}

Thursday, 9 March 2017

CSS



How many CSS styles is there?
CSS Styles are 3 types
Inline styles : We can write styles inside of tag like this
<div style = “color:blue; font-size:14px”> content here</div>
Internal styles : We can write styles in head tag, between style tag, and we will use same class in like multi areas like below
Creating in between head and style tags
<head>
<style>class1{ color:blue; font-size:14px ;}</style>
</head>
Using in body area
<div class=”class1”>content</div>
·         External styles : we will write css styles in external style sheet, and we will add that style sheet in head or bottom,
Style like  this  inside of  styles.css file we will write like:  .class1{ color:blue; font-size:14px ;}
We will add that style sheet in header like this:
<head>
                <link rel=”stylesheet” href=”styles.css” />
</head>
Use CSS class like below:
<div class=”class1”>content</div>

Monday, 6 March 2017

Don't close drop down menus/Onclick body only close dropdown menus/ Drop downs dont close on click anchor

  • Don't close drop down menus
  • Onclick body only close dropdown menus
  • Drop downs dont close on click anchor
 <script>
         $('ul.dropdown-menu.mega-dropdown-menu').on('click', function(event){
            // onclick list item dont close dropdown menus
            event.stopPropagation();
        });
  </script>

Onhover div display icons or other data in div using jquery,

  • Onhover div display icons or other data in div using jquery,
  • you can display div on div using jquery
  • you can add any icon on hover mouse to div
  • Attached screenshot also
 <div class='classnamehere'>
description will goes here..
</div>

<script>
$( ".classnamehere" ).hover(
  function() {
    $( this ).append( $( "<div class='message-hovers'><span><a href='https://google.com'><i class='fa fa-commenting-o' aria-hidden='true'></i></a><a href='https://google.com'><i class='fa fa-flag' aria-hidden='true'></i></a><a href='https://google.com'><i class='fa fa-clock-o' aria-hidden='true'></i></a>  </span></div>" ) );
  }, function() {
    $( this ).find( "span:last" ).remove();
  }
);
 
</script>