The problem I am trying to solve in my project:
I want to have the selected state of a link in my navbar be a small icon.
I want that icon to sit directly below and in the middle of the navbar link text.
I can't seem to figure it out.
I mimicked some of the css in the project below.
Essentially I am trying to get the text "trying ma best" centered in the middle of the parent "center the text below me relative".
All of our nav links sit inline, so I don't want to alter the a tag being inline.
https://jsfiddle.net/6Lk1uqs8/5/
here is the code in the fiddle:
<a href="#">
center the text below me relative to me
<div>
trying ma best
</div>
</a>
a {
display: inline;
}
div {
display: inline;
position: relative;
top: 15px;
right: 50px;
}
Any help is greatly appreciated.