Display elements of the same class next to each other horizontally
NSCarter (3)

I have four divs in my code. Two are members of the "top" class and two are members of the "bottom" class. I want the divs in the top class to be displayed next to each other and above the divs in the bottom class but at the moment they all display one below the other. The number of divs could change but there will always be an equal number in the top and bottom class.

You are viewing a single comment. View All
EthanJustice (62)

As Edgod said, change the display property for the divs from table to inline-block. Further reading: W3 and MDN.