This is Strange

ok so i was making the buttons for my codepen when i moved them they didn’t work so i added a letter to there classes so they went back to default and they worked why does it do this? the class is in the css its called button 1 and button2 just eliminate the letter in front of the number https://codepen.io/Not-a-bot-at-all/pen/VwKeRXM

Class names cannot start with a number.

they dont its .button1 and .button2

I assumed you were talking about your h1 and h3 classes, since they are the only one that have a single letter before a number.

I guess that I don’t understand the question. For your radio buttons, it looks like you have changed the class selectors in your css so that they don’t match the classes used on the radio buttons. This means that the rules in those selectors will not be applied. It has nothing to do with what characters are in the name, just that you are not using the names consistently.

if i use the position:relative and move the radio buttons dont work i think i should add that and now by something if i switch the classes they work

What do you mean when you say they “don’t work”.
Once again, the effect that you are seeing is that when you add a character to the name in the CSS section but not the HTML section, then those class styles are not being applied at all.

essentially if i move the buttons to the line where it says First time? it doesn’t work but if i move them anywhere else they work

anyway thanks for helping me @ArielLeslie

I think you should re-write this, your html structure is confusing if you want these two radio buttons next to the "First Time?" then you should not have written "First Time?" later on when there are other elements between them you are tying to restructure everything using CSS only, which will totally become a headache so you should first organize your html and then style it.

1 Like

So because the buttons were on top of the first time it didn’t work i reorganised it and put it under now it works tnx @mdshariq

1 Like

They do work in front of the heading, but that changes their position in the document so the relative position changed. You would need to make adjustments to the offset values.

BTW, I would not suggest using positioning when at all possible, use the normal document flow as much as possible.

1 Like