G
G
GoodProject2015-09-12 15:35:58
css
GoodProject, 2015-09-12 15:35:58

Is this a good way to align text and icons on the same line in different boxes?

Kind.
In general, one question, or rather the solution of one issue, is of interest.
There is the top of the site.
On the left - a block with links Login / Register.
On the right is a block with VK, FB, Twitter icons. (Font Awesome)
Both blocks are floated, one float:left, the other float:right.
And they stand unevenly, a trifle, because if you don’t look closely, it’s imperceptible, but still I want everything to be even, and I decided to add line-height: 1px to the block on the left and the block on the right, and they aligned.
Do you think this decision has the right to life?
It's just that I'm just learning to typeset, and perhaps this solution may be delusional/wrong, or has been around for a long time, so don't judge strictly)
wMP6eds.png
Imagine a line that goes exactly in the center after the word Register, it will go to the very top of the VK icon, that is, by default, the line height is different ..
If you know similar ways to align and solve this problem, please suggest , I will be interested.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
Rafael™, 2015-09-12
@GoodProject

Forget about floats
Use flexbox everywhere - a universal alignment tool

N
Nicholas Komarov, 2015-10-04
@GloomySpodgeBob

webdesignmaster also look)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question