• Resolved wellsite

    (@wellsite)


    I’m currently playing with Contact Form 7 under wordpress 3.0.
    I want to control the layout of the checkboxes and radio buttons.

    I want the check boxes to be placed above each other. So I have used your suggestion and added the following line:

    span.wpcf7-list-item { display: block; }

    Great. But this has now made the radio boxes blocked too. But I want them to remain inline.
    How to control the layout for the radio boxes ?

    Thank you

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Takayuki Miyoshi

    (@takayukister)

    This should work.

    span.wpcf7-checkbox span.wpcf7-list-item { display: block; }
    span.wpcf7-radio span.wpcf7-list-item { display: inline; }
    Thread Starter wellsite

    (@wellsite)

    Thank you very much. That has worked brilliantly.
    Excellent plugin.

    This is what I am looking for but there is a missing instruction. Exactly here should I put that code? I already tried putting it in the form, just ahead of the checkboxes – but it changes nothing.

    I see the note below here, “Put code in between backticks.” but I have no idea what “backticks” are or where to find them. Can anyone expand to include the missing instructions?

    BTW – I agree, this is a really well done plugin. Probably, in the top three os all “Essential WP plugins.”

    Thank you

    Thread Starter wellsite

    (@wellsite)

    i just added the lines at the bottom of my stylesheet and it all worked.
    I had to do a couple of refreshes of the contact form page. That’s it.

    How to use HTML in checkbox ?

    I am sorry to sound stupid, but which stylesheet is this code to use.

    Is it the .css stylesheet for the individual theme used for the look of the site or is it the style.css of the contact form plugin?

    Well, my goal was to have the radio buttons left justified, with each new button on a new line and if the sentence was more than one line, to have the sentences lined up equally. Does that make sense?

    I was tired of feeling stupid, because I am not, so I have spent a few hours reading some css tutorials, but mostly trial and error.

    The code which seems to work is

    span.wpcf7-checkbox span.wpcf7-list-item { display: block;
    text-align:left;
    width: 25em;
    text-indent: -25px;
    text-padding: 15px;
    }

    span.wpcf7-radio span.wpcf7-list-item { display: block;
    text-align:left;
    width: 25em;
    text-indent: -25px;
    text-padding: 15px;
    }

    Notice I duplicated for radio and for checkbox.

    This has gotten the result I want, but I have a question on what is going to happen on the next form I create. Will I have to go through a bunch of tweaking to get both forms to work?

    I put the code

    span.wpcf7-checkbox span.wpcf7-list-item { display: block; }

    at the bottom of my css file and it fixed the form brilliant. What a neat hack! ??

    Thanks!

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘[Plugin: Contact Form 7] Modifying layout of checkboxes and radio boxes’ is closed to new replies.