Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
6.0k views
in Technique[技术] by (71.8m points)

css - Header elements alignment

I'm trying to replicate this header: https://minelligroup.com/ on this website that is related: https://blog.minelligroup.com/packaging

But, as you can see, I have some alignment problem with the social sharing buttons. I can't find what is impeding them to be aligned with the rest of the menu bar. I suppose it could be a problem of transition but I can't solve it.

Thank you for your help.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

You can imagine the nav like so

Navbar breakdown

There are two columns, in the second column are the socials and menu. Each are 100% in width relative to their parent column. Use text-align:right; and display:inline-block; to "float" them right.

Here is a working example: https://jsfiddle.net/5fdpwngy/


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
by (100 points)
In My case, When I Do text-aligh:right;  , Its not working with me. What will be the issue?...):

Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...