If you want to center an element in the browser, you must understand how HTML positioning works.
-
If you want to center an element in the browser, you must understand how HTML positioning works. The element knows where it is at all times. It knows this because it knows where it isn't. By subtracting where it is from where it isn't, or where it isn't from where it is (whichever is greater), it obtains a difference, or deviation. 1/2
-
If you want to center an element in the browser, you must understand how HTML positioning works. The element knows where it is at all times. It knows this because it knows where it isn't. By subtracting where it is from where it isn't, or where it isn't from where it is (whichever is greater), it obtains a difference, or deviation. 1/2
The rendering subsystem uses deviations to generate corrective commands to drive the element from a position where it is to a position where it isn't, and arriving at a position where it wasn't, it now is. Consequently, the position where it is, is now the position that it wasn't, and it follows that the position that it was, is now the position that it isn't. 2/2