Html css survey

hello everyone i am trying to align my radio buttons with their labels but its not working i tried to wrap them in div and in css display:flex,column…but i am stuck please help but when i use the margin it treats the buttons and labels as one

1 Like

I think we are going to need to see your project before we can really offer any good advice. Link please.

1 Like

hello thank you for replying :pray: i spent hours searching and trying surprisingly it worked i dont remember how ,but can you please help in @media ??? ???

note:i am a beginner you might see good amounts of codes for a simple project

The labels and radio buttons look aligned to me but the way you are doing it is probably not the best. You don’t really want to use <br> to force new lines like that. I like your original idea better of wrapping each label/radio button in a div. I would switch to that instead.

1 Like

thank you so much ,so when its best use br?:blossom:

If in doubt, consult the manual :slight_smile:

<br>: The Line Break element

Pay special attention to the note:

Note: Do not use <br> to create margins between paragraphs; wrap them in <p> elements and use the CSS margin property to control their size.”

And also the accessibility concerns:

“Creating separate paragraphs of text using <br> is not only bad practice, it is problematic for people who navigate with the aid of screen reading technology. Screen readers may announce the presence of the element, but not any content contained within <br> s. This can be a confusing and frustrating experience for the person using the screen reader.”

In summary, the use case for <br> is very very small and narrow and you should probably never use it unless you are writing poetry or need to format an address.

thank you so much ,i’ll replace them