Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Cursor:pointer area in radio-buttons is too big

I’m really new to html and css. I’m making a form and having two problems:

  1. Wide spacing between question and answers. Second pic is how I want it to look like
  2. Cursor:pointer went out of the text (went to top and side). I tried raising radio-buttons margin higher but then the cursor:pointer covers the question.
.form-element {
    display: flex;
    flex-direction: column;
    margin: 0 0 20px 0;
}

.form-element span {
    margin: 0 0 5px 0;
}

.radio-buttons {
    display: flex;
    align-items: left;
}

.radio-buttons label {
    cursor:pointer;
}
<div class="form-element radio-buttons">
            <span>Would you like to remain anonymous?*</span>
            <label for="No.&lrm;"><br />
                <input type="radio" required id="No.&lrm;" name="entry.1808372660" value="No.&lrm;" />
                <span>No</span>
            <label for="Yes"><br />
                <input type="radio" required id="Yes" name="entry.1808372660" value="Yes" />
                <span>Yes</span>
        </div>

>Solution :

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

<br /> remove this and try

.form-element {
    display: flex;
    flex-direction: column;
    margin: 0 0 20px 0;
}

.form-element span {
    margin: 0 0 5px 0;
}

.radio-buttons {
    display: flex;
    align-items: left;
}

.radio-buttons label {
    cursor:pointer;
}
<div class="form-element radio-buttons">
            <span>Would you like to remain anonymous?*</span>
            <label for="No.&lrm;">
                <input type="radio" required id="No.&lrm;" name="entry.1808372660" value="No.&lrm;" />
                <span>No</span>
            <label for="Yes"><br />
                <input type="radio" required id="Yes" name="entry.1808372660" value="Yes" />
                <span>Yes</span>
        </div>
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading