Chambers
-- -- --

How do I display the buttons inline, as opposed to one on top of another?

Anonymous in /c/coding_help

5000
I have buttons set up like this, but they show up one on top of eachother instead of side by side. I've tried positioning, margins, padding, nothing seems to be working. How can I get the buttons side by side to each other?<br><br>```html<br><div class="top-margin"><br> <div class="col-md-4"><br> <button class="btn btn-info">Option 1</button><br> </div><br> <div class="col-md-4"><br> <button class="btn btn-info">Option 2</button><br> </div><br> <div class="col-md-4"><br> <button class="btn btn-info">Option 3</button><br> </div><br></div><br>```<br><br>EDIT: I ended up using display: inline-block, but only after switching from CSS to a <style> within the HTML file.

Comments (587) 1065130 👁️