Looking to position an emoji-panel in the bottom right corner
with dimensions relative to the screen width.
Everything works fine when position
is set to not fixed
(see first image).
However, switching the position
to fixed
causes strange changes to both the background panel and emojis inside it (see second image).
https://i.sstatic.net/cCUwM.jpg https://i.sstatic.net/Bq2uz.jpg
HTML Code:
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
.panel{
/*position:fixed;*/
bottom: 0;
right: 0;
width:100%;
height:7%;
background-color:#dbd9d3;
border:1px solid black;
}
.panel_emojis{
width: 14%;
height: 14%;
margin-right: 1.1%;
margin-left: 1.1%;
}
</style>
</head>
<body>
<div class="panel">
<img src="emoji.png" class="panel_emojis" />
<img src="emoji.png" class="panel_emojis" />
<img src="emoji.png" class="panel_emojis" />
<img src="emoji.png" class="panel_emojis" />
<img src="emoji.png" class="panel_emojis" />
<img src="emoji.png" class="panel_emojis" />
</div>
</body>
</html>
Is there a way to reposition it to the bottom right without affecting the size of the background and images?