I have such a problem.
There are 3 divas:
| | | | | | | DIV1 | | DIV2 | | DIV3 | |_ _ _ _ _ _| |_ _ _ _ _ _| |_ _ _ _ _ _| DIV1throws to the left (float: left),DIV3rushes to the right (float: right),DIV2should be centered (float: left, so written in style, and it became centered).
DIV1 and DIV3 are invisible. They appear when you hover the mouse on one object X But then DIV2 (when DIV1 and DIV3 invisible) ceases to be in the center, DIV3 it was obtained in the center due to the fact that DIV1 also has the property float: left .
So how to align it? That is, if you do not aim at the object X we get:
| | | DIV2 | |_ _ _ _ _ _| And when you hover:
| | | | | | | DIV1 | | DIV2 | | DIV3 | |_ _ _ _ _ _| |_ _ _ _ _ _| |_ _ _ _ _ _| It is desirable without tables (with the table, I know how, just wondering: can I do without it?) And to have less bad code and style.