Reputation: 11
This may seem trivial, but I am trying to add an icon to a bootstrap tab but I'm having style issues.
Looking for a CSS solution with the following:
CANNOT put the icon inside the anchor tag, they must remain at same level.
<a></a><i></i>
If anyone can solve this, it'd be greatly appreciated.
Upvotes: 1
Views: 623
Reputation: 502
Because Bootstrap styles the a
inside the tab li
, you must then redesign the tab to apply the style not to the a
but to the li
.
If you can't do that, then you should wrap the icon inside the a
.
You can try add:
display: inline-block;
to your a
inside the li
tag.
nav>li>a {
position: relative;
display: inline-block;
padding: 10px 15px;
}
Upvotes: 1