Confused - Horizontal Checkbox HTML/CSS

I am trying to fix my HTML/CSS for the checkbox area for my FCC Survey project and im having a ton of trouble getting my checkboxes to go in a horizontal line without the words being under the checkbox. Originally, I used < br > to make it look how I needed but luckily, I was told that was incorrect. I want to make sure I am writing code properly but after all my googling, I am 100% confused.

At this point, I know I need to add extra code. I only included “display: block;” because im hoping I may at least be on the right path. Im also hoping I cleaned up my HTML to look better. Im sorry I don’t have a “before” and “after” to show you guys.

CodePen Link: https://codepen.io/xCalypsoCodes/pen/LYWWYEX

Any suggestions?

I think setting the labels to display:block instead of the inputs should do what you’re trying to achieve.

1 Like

That did work! What I did was change my “.checkbox-code” and put “label” in its place and it worked! Wow, I can’t believe it was such a small change. Thank you so much!

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.