Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #493344

    Hi,
    At the moment, the blog comments section has 4 fields, comments + name, email and website. I want to get rid of the website field, which I assume is just display:none; but I then want the remaining two fields 50% wide with labels above. The fields are inside p instead of divs, and I am having trouble formattting them. Well, I can’t persuade the labels to float above the fields.

    How do I do it?

    Instead of labels, or in addition, it would also be nice to be able to put placeholder text inside the fields. How can I do that?

    To allow me to style comments in other areas differently – should it be necesary – when I built the post I put the comments inside a fullwidth div called ‘gramcomment’.

    Many thanks

    #493355

    I more or less sorted the formatting (it’s not perfect but it’ll do) and somehow the labels finally showed up in the right place (don’t know why). However, after hiding the website field and making the remaining two 49% wide I can’t have a 2% margin between them. For some reason a 100% width total isn’t possible. So I reduced the width of the main comments box by 1%. Odd, with no margins visible…

    However, to repeat my last question, how can I add placeholder text in the fields?

    #493643

    Hey!

    See here for how to use placeholder text for inputs, http://www.w3schools.com/tags/att_input_placeholder.asp.

    To actually change that though you’ll need to add some extra arguments to the comment_form function as seen here, https://codex.wordpress.org/Function_Reference/comment_form.

    You can see where we use the comment_form function on line 164 in the /enfold/comments.php file.

    Cheers!
    Elliott

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.