So basically i want my Social Bar to be on the Right side of the Screen yet i just can't figure out why it wont move :(
Tried to mess with the Icon Bar and shiz but im still learning so i don't really know what to do
HTML
.icon-bar {
position: fixed;
top: -100%;
-webkit-transform: translateY(50%);
-ms-transform: translateY(50%);
transform: translateY(50%);
}
.icon-bar a {
display: block;
position: static;
text-align: left;
padding: 16px;
transition: all 0.3s ease;
color: white;
font-size: 20px;
}
.icon-bar a:hover {
background-color: rgb(196, 44, 44);
}
.twitter {
background: #55ACEE;
color: white;
}
.instagram {
background: #125688;
color: white;
}
.linkedin {
background: #007bb5;
color: white;
}
CSS
<!-- Social Buttons -->
<div >
<a href="https://twitter.com/" target="_blank" ><i ></i></a>
<a href="https://www.instagram.com//" target="_blank" ><i ></i></a>
<a href="https://www.linkedin.com/in//" target="_blank" ><i ></i></a>
CodePudding user response:
.icon-bar {
position: fixed;
top: -100%;
-webkit-transform: translateY(50%);
-ms-transform: translateY(50%);
transform: translateY(50%);
}
The top value of -100% in icon-bar selector is causing issue in your code. By setting the value of -100% the bar is being pushed up in the viewport, to a point where it becomes invisible.
CodePudding user response:
Is this what u need?
.icon-bar {
position: fixed;
top: 0;
background-color:red;
width: 100%;
display: flex;
flex-flow: row-reverse nowrap;
}
.icon-bar a {
display: block;
padding: 16px;
transition: all 0.3s ease;
color: white;
font-size: 20px;
}
.icon-bar a:hover {
background-color: rgb(196, 44, 44);
}
.twitter {
background: #55ACEE;
color: white;
}
.instagram {
background: #125688;
color: white;
}
.linkedin {
background: #007bb5;
color: white;
}
<!-- Social Buttons -->
<div >
<a href="https://twitter.com/" target="_blank" ><i ></i></a>
<a href="https://www.instagram.com//" target="_blank" ><i ></i></a>
<a href="https://www.linkedin.com/in//" target="_blank" ><i ></i></a>
</div>
