HubsInfo Network

Tooltip/popup - HTML/CSS and JS

0 Members and 1 Guest are viewing this topic.

Tooltip/popup - HTML/CSS and JS
« on: November 13, 2016, 10:39:36 PM »
HTML
Code: [Select]
Open DIV

   

       

           

Here's The Popup!



           
Click the link to close.
           

Close

       

   



JS
Code: [Select]
function show(target) {
    document.getElementById(target).style.display = 'block';
}

function hide(target) {
    document.getElementById(target).style.display = 'none';
}


CSS
Code: [Select]
body {
    height: 100%;
    background-color: #F0F0F0;
    font-family: Arial, sans-serif;
}
#mydiv {
    width: 100%;
    height: 100%;
    overflow: hidden;
    left: 100px;
    top: 100px;
    position: absolute;
    opacity: 0.5;
    z-index: 200;
}
#mydiv-container {
    margin-left: auto;
    margin-right: auto;
}
#mydiv-content {
    width: 70%;
    padding: 20px;
    background-color: white;
    border: 1px solid #6089F7;
}
a {
    color: #5874BF;
    text-decoration: none;
}
a:hover {
    color: #112763;
}





--
Ref: http://jsfiddle.net/HbGM2/