anchor tag overflow

Hello experts,

I don't know why the anchor tag has the wrong width and height properties. The main element .notificationsBarNav is display flex, but on other similar "tabs" I use floating and the anchor tag is still wrong size when use with *google font icon* and some *span* text.

When I try to change the width and height  in the chromeDevTools, it doesn't react on it.

http://tinypic.com/r/15i6wwi/8

Here's the css:

.notificationsBarNav {
    height: 33px;
    padding: 0 5px;
    display: -webkit-flex;
    display: -moz-flex;
    display: -ms-flex;
    display: -o-flex;
    display: flex;
    justify-content: space-between;
    align-items: center;

    > div, a {
      height: 33px;
    }

    a,i, span {
      color: #fff;
    }

    .material-icons {
      font-size: 28px;
      line-height: 33px;
    }
  }

Open in new window

LVL 1
Fajer39Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Tom BeckCommented:
Inline elements like <a> and <span> cannot have width or height set. It will be ignored. Add display:inline-block to the <a> tag to change from inline to block behavior so that width can be set.
1

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Fajer39Author Commented:
you are right Tom, it works, thank You.

But one last problem- the height of the the anchor tag is ok now but the span with *(0)* is still not vertical-align: middle as it should. How to fix that?
0
Fajer39Author Commented:
Solved- I have to remove height and line-height
0
Tom BeckCommented:
Thanks for the points.
1
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
CSS

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.