Welcome to OGeek Q&A 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 Reply

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?...):

OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...