Multiple unlimited css submission buttons are displayed in the center, fixed only by css, and centered by css.
A few days ago, the company fixed the problem of centering multiple buttons in a css file. In fact, many front-end programmers have encountered such problems. For example:
There are three buttons or two buttons in a row... the number is not fixed, and the spacing is fixed. Then many people put all the buttons in a div and set the div to margin: 10px auto (10 pixels above, center, then a fixed width is given, and the button is placed in this div, so that the button cannot be centered). What should I do if the button is reduced to two or one,
Many people also use javascript to dynamically calculate the width and then calculate a lot of data, which is often easier to use.
Error code:
1 <! DOCTYPE html> 2
Modified as follows:
<! DOCTYPE html>
In fact, these problems seem very simple. There are still many beginners who cannot implement them. Many people also use javascript to implement them. In fact, they are completely unnecessary.