WordPress.org

Ready to get started?Download WordPress

Forums

Contact Form 7
Field resize is not working. (7 posts)

  1. Alex117
    Member
    Posted 2 years ago #

    Hi,

    Thank you for such a great plugin!

    I've been trying to resize some of the text fields, but nothing at all will happen. All of the field's remain a certain width no matter how hard I try to force them to shrink. I'm not sure if this has something to do with my theme, but I skimmed the theme's "style.css" file and played with the width values I saw, but that still had no effect.

    In Contact Form 7 I'm using the following example:

    [text your-name 5/]

    But, the width still remains much wider than 5 pixels.

    Can anyone help me with this?

    Much appreciated, thanks!

    http://wordpress.org/extend/plugins/contact-form-7/

  2. patweb83
    Member
    Posted 2 years ago #

    Haven't tried it this way, yet. But you can just use a css class, for example [text your-name class:formfield] and add

    .formfield {width:120px;}

    to your stylesheet.

  3. Alex117
    Member
    Posted 2 years ago #

    Thanks,

    Just gave that a shot, but the width remained the same :/

    I had thought of that earlier and assigned a class to it as well. This time I set the width to 1000px, but not a single noticeable difference.

    I added the class to the theme's style.CSS and to the styles.CSS file in the Contact Form 7 directory.

    I have no clue what's constraining the width of the fields from expanding or shrinking. In the meantime, I've contacted the theme's developers to see if the theme's default CSS styling has anything to do with it.

    Thanks for your idea though!

  4. patweb83
    Member
    Posted 2 years ago #

    Strange. I recommend using firefox with the plugin firebug to check if another css parameter is intervening with the size of your form fields.

  5. TheSilver
    Member
    Posted 2 years ago #

    @Alex117
    Where you able to find a solution to your problem? I've read all the documentation provided by Contact Form 7, tried variations of adjusting the width of the text field with no luck. If you were able to fix this please share the secret with me.

  6. TheSilver
    Member
    Posted 2 years ago #

    I figured it out. I edited the style.css and changed the setting to "auto" instead of "258px". Now, I can use the width adjustment feature when creating the field and my style.css looks like this:

    div.wpcf7 input[type="text"] {
    background: #fff;
    width: auto;
    height: 18px;
    margin: 0;
    padding: 3px 5px 3px 5px;
    border: 1px solid #e3e3e3;
    float: left;
    line-height: 1.5em;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 12px;
    color: #949494;
    }

  7. Pietro_2003
    Member
    Posted 1 year ago #

    Cheers, this worked for me too... after quite a bit of Googling. ;)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic