I need help to fix the error of my smiley button and pops when i hover over (see example below). I think the problem is related within .chatbox / form field or hover smiley. It could also be related to the div style min/max-width details etc.
Any suggestions or examples would be very grateful here. Thx stewy
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Home</title>
<link rel="icon" type="image/png" href="pix/icon.png" />
<style type="text/css" href="/fonts">
html {scroll-behavior: smooth;}
@font-face {
font-family: vag;
src: url(fonts/VAGRoundedStd-Light.otf);
}
body {
background-color: grey;
background-image: url(pix/bg1.png), url(pix/bg2.png);
background-size: 1100px 100vh;
background-position: left top, right top;
background-repeat: no-repeat;
overflow: hidden;
margin: 0px;
font-family: Arial;
color: darkgrey;
font-size: 12px;
line-height: .3;
letter-spacing: .5px;
}
.logo {
position: absolute;
top: 20px;
left: 3%;
}
.cam {
position: absolute;
top: 20px;
right: 3%;
border-radius: 60px;
}
.livestream {
object-fit:cover;
height: 100vh;
max-width: 100%;
display: block;
margin: auto;
}
/*............... chatbox ...............*/
.chatbox {
position:fixed;
bottom: 80px;
left: 50%;
transform:translateX(-50%); /* center */
width:50vw;
height:42px;
background-color: #2f2f2f;
border-radius: 0px 30px 30px 0px;
z-index: 3;
}
/*... input message ...*/
input[type=text] {
width: 100%;
height: 40px;
border: none;
outline: none;
padding-left: 37px;
font-family: vag;
color: white;
font-size: 16px;
font-weight: bold;
letter-spacing: 1.5px;
background-color:transparent;
}
/*............. footer bar.............*/
.footerbar {
position: fixed;
border-radius: 50px 50px 0 0;
bottom: 0px;
width: 100%;
height: 100px;
background-color: rgba(0, 0, 0, 0.4);
backdrop-filter: blur(20px);
-ms-backdrop-filter: blur(20px);
-moz-backdrop-filter: blur(20px);
-webkit-backdrop-filter: blur(20px);
z-index: 2;
}
/*........ crossfade on buttons ........*/
#hover img{
transition:.3s;
position:absolute;
}
.nohover{
opacity:0;}
a:hover .hover{
opacity:0;
}
a:hover .nohover{
opacity:1;
}
<img class="logo" src="pix/logo.png" width="100">
<img class="cam" src="pix/cam.jpg" width="117">
<img class="livestream" src="http://wizzfree.com/pix/bg1a.jpg">
<!--................ chatbox ..................-->
<div class="chatbox" style="min-width:400px;max-width:600px;display:flex;margin-left:15px;">
<!-- emojis gallery -->
<a class="hover" href="emojis.htm">
<img src="http://wizzfree.com/pix/smiley.png" height="42" style="margin-left:-32px;">
<img src="http://wizzfree.com/pix/smiley2.png" height="42" class="nohover" style="margin-left:-32px;">
<img src="http://wizzfree.com/pix/smiley.png" height="42" class="hover" style="margin-left:-32px;">
</a>
<!-- input message -->
<input type="text" id="fname" name="fname" value="Type Your Message" onFocus="this.value=''">
<!-- typing on/off -->
<p style="margin-top:18px;margin-right:15px;color:#ff6f6f;font-family:vag;font-size:16px;letter-spacing:1.5px;"><em><strong>Typing...</strong></em></p>
</div>
Apply the following css:
.hover {
position: relative;
}
.hover img{
position: absolute;
}