Could help me figure out what the heck is wrong with my code?!

How can i align the checkboxes with the text in my code? I tried re-doing the form course over again, but can’t seem to know what i have done wrong.

So you have a class called .check-box… in that class you set display: block. You are applying this to all your labels and checkboxes. Block items create a new line, so that would explain why your labels and checkboxes aren’t on the same line because they are block items… you could set them to inline-block, or just inline.

From: display - CSS: Cascading Style Sheets | MDN

The element generates a block element box, generating line breaks both before and after the element when in the normal flow.

The element generates one or more inline element boxes that do not generate line breaks before or after themselves. In normal flow, the next element will be on the same line if there is space

1 Like

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