A free library of HTML, CSS, JS

Search This Blog

Tuesday, 11 April 2017

Tooltip with bootstrap

<!DOCTYPE html>
    <meta charset="utf-8" />
    <title>Tooltip with bootstrap</title>
<script type="text/javascript">
<div class="navbar tooltip-demo">
            <ul class="nav">
              <li><a class="top" title="" data-placement="top" data-toggle="tooltip" href="#" data-original-title="Tooltip on top">Tooltip on top</a></li>
              <li><a class="right" title="" data-placement="right" data-toggle="tooltip" href="#" data-original-title="Tooltip on right">Tooltip on right</a></li>
              <li><a class="bottom" title="" data-placement="bottom" data-toggle="tooltip" href="#" data-original-title="Tooltip on bottom">Tooltip on bottom</a></li>
              <li><a class="left" title="" data-placement="left" data-toggle="tooltip" href="#" data-original-title="Tooltip on left">Tooltip on left</a></li>

Monday, 10 April 2017

Text-shadow not showing

I want to apply text-shadow property on a heading text but it is not showing

<style rel="Stylesheet" type="text/css" >
 .shadow { 
  color: black; 
  font: bold 52px Helvetica, Arial, Sans-Serif;
  text-shadow: 1px 1px #fe4902, 
            2px 2px #fe4902, 
            3px 3px #fe4902;
   -webkit-transition: all 0.12s ease-out;
   -moz-transition:    all 0.12s ease-out;
.shadow:hover {
   position: relative; 
   -webkit-transform: scale(1.1); 
   -moz-transform:    scale(1.1);
   -ms-transform:     scale(1.1); 
   -o-transform:      scale(1.1); 
   text-shadow: 5px 0px 2px rgba(150, 150, 150, 1);


 <h1 class='shadow'>Reseller welcome</h1>

Wednesday, 5 April 2017

CSS !important not working

I have the following code and for some reason the !important qualifier isn't working.

<div style="font-family : calibri; font-size: 20pt !important;">
      <span style="font-size: 11px;">
        <span style="font-size: 11px;">
          Honey Glazed Applewood Smoked Spiral Ham 
        <span style="font-size: 11px;">
          Served with Dijon Honey Mustard and Turkey Roulade

Give the <div> an id and then add this rule to your CSS stylesheet (or in a <style> tag if you don't want to change the style sheet):

#your_div_id span {font-family : calibri; font-size: 24px !important;}

!important in CSS allows the author to override inline styles (since they have a higher precedence than style sheet styles normally). It doesn't automatically make the style marked !important override everything else.

Tuesday, 4 April 2017

Some Reason CSS not working

This problem is making me feel like an absolute noob.

Here is the head of my .html file:

<html xmlns="" >
<link href="" rel="stylesheet"/>
<title>Some Reason CSS not working</title>


And my html.css file is indeed where it should be. But I'm getting absolutely no styling whatsoever. Help!

And please don't down vote just because the answer is obvious and I can't see it.

1. Maybe CSS not available in folder
2. Maybe Path issue
3. Maybe you can't attach the CSS
4. Maybe css name 

You can check all issue your design as working fine.

Okay, so now I'm just trying to fix the problem locally on my machine. Here is the head:
<html xmlns="" >
<link href="style.css" rel="stylesheet" type="text/css"/>(Note: Use like this)



Friday, 31 March 2017

CSS Font Sizes

In this tip, you will learn how to specify a font’s size with CSS.

Being a practical nerd, I will not waste time talking about all the various methods for declaring font sizes with CSS … instead I will concentrate on the two widely used ways and then briefly explain the differences. First, the two main methods:

By pixel

By em

What is the difference between and EM and a pixel?

Pixels are an absolute measure of a font’s size and an EM is a relative measure – that means the actual pixel size of the font (as they appear on screen) set with EM’s, can fluctuate. This makes using EM’s trickier. So the nerd answer is NOT to use EMs!

Let’s look at a quick EM example anyway:

<div style="font-size:1.2em">
So the above would cause the fonts to be about 20% larger than the baseline font size – thus 1.2em. I am not going to go into all the nerd details about EM’s because I think pixels are the way to go.

Thursday, 30 March 2017

Height:100vh doesn't work correctly with content in the div

<!DOCTYPE html>

<html lang="en" xmlns="">
    <meta charset="utf-8" />
    <title>Height:100vh doesn't work correctly with content in the div</title>
<style type="text/css">
    .intro { color: #fff;height: 100vh; background: url('yourimage.jpg') no-repeat center center; background-size: cover;  position: absolute;bottom: 2em; }
    p.hello {margin: 30px; }
    .page1 {color: #fff; height: 100vh; background: beige; }
    .page2 {color: #fff; height: 100vh; background: black; }

    <div class="container">
        <div class="row">

            <div id="intro" class="intro">

                <div class="text-center">
                    <p class="hello">
                        Intro text is coming soon!
                    <div class="col small-col-12 intro--buttons">
                            Buttons coming here.


            <div id="page1" class="col col-12 page1">
                <p>Tekst test</p>

            <div id="page2" class="col col-12 page2">
                <p>Tekst test.</p>


Wednesday, 29 March 2017

Height for Full Screen Div?

I have a DIV element that needs to fill the entire screen until the user scrolls and reveals the content. So essentially remain at the viewports height.

Here is what I did and it works, but it’s only compatible with newer browsers.

.section-full {


Tuesday, 28 March 2017

Changing the Font to All Caps with CSS

While text in general is hard to read when written in all caps – and considered the electronic version of yelling – using CAPS for emphasize is a handy tool.

Headers are a place where capitalization is frequently used. And to assure that your header is displayed uniformly throughout the site without having to worry about actually writing in all caps, just use CSS:

h1 {
text-transform: uppercase;

With this, everything that has the h1 tag applied, WILL APPEAR IN ALL CAPS.

Another interesting text-transformation property is "capitalize"

h1 {text-transform: capitalize;}

With This, All Your Words Will Begin With A Capital Letter!

The 3 ways to insert CSS into your web pages

1. With an external file that you link to in your web page:

<link href="myCSSfile.css" rel="stylesheet" type="text/css">
or using the import method:

<style type="text/css" media="all">
   @import "myCSSfile.css";


2. By creating a CSS block in the web page itself; typically inserted at the top of the web page in between the <head> and </head> tags:

   <style type="text/css">
      p { padding-bottom: 12px; }

3. By inserting the CSS code right on the tag itself:

<p style="padding-bottom:12px;">Your Text</p>

Wednesday, 22 March 2017

How can i add label in Select Option in HTML

You can use this html code in your webpage.

<select class="board-selector">
                <option label="Create a Board">Create a Board</option>
                <option label="View all Boards">View all Boards</option>
                <optgroup label="Recent Boards">
                    <option label="awesome" selected="selected">awesome</option>