• Resolved mouzd

    (@mouzd)


    Hello,

    The three fields in the comment section (Name, Email & Website) were equally divided in size in the same line, with size=22-22-22 for each, in the comments.php file. I disabled the website field, and now the size of the fields is 22-22-blank. How do I change the size of the two visible fields (Name and email) to 50-50, so that each field takes up 50% of the screen size?

    Hope I could convey the problem. Any help would be highly appreciated.

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    .col-md-4.col-xs-12.comment-author-input, .col-md-4.col-xs-12.comment-email-input {
        width: 50% !important;
    }

    To add or override CSS: use the “Additional CSS” option in the customizer.? https://codex.www.ads-software.com/CSS#Custom_CSS_in_WordPress

    Use the Chrome Developer Tools or Firefox Developer Tools to help you see and test changes to your CSS.

    Thread Starter mouzd

    (@mouzd)

    Immense thanks ??
    This solves the problem on bigger screens however, on mobile phones it doesn’t stack over each other.

    Any solutions?

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    Well, you didn’t say that was important! You could change the width to 100% inside a media block…. something like

    .col-md-4.col-xs-12.comment-author-input, .col-md-4.col-xs-12.comment-email-input 
      {
        width: 100%;
     }
    
    @media and (min-width:400px) {
    .col-md-4.col-xs-12.comment-author-input, .col-md-4.col-xs-12.comment-email-input 
      {
        width: 50%;
     }
    }

    That’s untested, but should work. The fields are wide, but when the screen is wider than 400px, they’ll drop to 50% and then fit on one line.

    Thread Starter mouzd

    (@mouzd)

    Works great. Thank you for your prompt reply.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How to change the Name and Email field to size 50-50 in the comment form?’ is closed to new replies.