Is Inline Block Not Working Because Margins Are Set? [duplicate]
问题 This question already has answers here : Two divs side by side - Fluid display (8 answers) How to place div side by side (7 answers) Closed 10 months ago . I'm trying to horizontally align two block elements and "display: inline-block" isn't working. I'm wondering if this is because I have unique margins set for each element. I don't understand CSS from a theoretical level. I will be adding a line to connect them visually once they're on the same horizontal line. h2 { padding: 75px; margin