WordPress.org

Ready to get started?Download WordPress

Forums

Contact Form 7
Conflicting Style Override Rows & Cols (11 posts)

  1. Tony Bianco
    Member
    Posted 3 years ago #

    I'm running into a problem here where even though I specify a column and row size for a textarea properly I have a conflicting class with a width that is overriding the cols and rows.

    See below:
    <textarea name="your-message" cols="8" rows="8" />

    .wpcf7 textarea {
    padding-bottom:3px;
    padding-left:3px;
    padding-right:3px;
    padding-top:3px;
    width:470px;
    }

    Do I need to go in and hack the plugin to fix this or override this in my styles?

  2. esmi
    Forum Moderator
    Posted 3 years ago #

    Unless you provide a link to a page demonstrating the problem, no one will be able to offer much in the way of assistance.

  3. Tony Bianco
    Member
    Posted 3 years ago #

    Here's the link:
    http://www.evolvhealth.com/calendar/

    I don't want to leave this up there for very long as it doesn't look good having a textarea wider than the sidebar width.

  4. esmi
    Forum Moderator
    Posted 3 years ago #

    Try adding:

    #sidebar .wpcf7 textarea {
        width: 270px;
    }

    to your stylesheet.

  5. Tony Bianco
    Member
    Posted 3 years ago #

    I know I can do that, but I was hoping for a way where that did not need to happen.

  6. esmi
    Forum Moderator
    Posted 3 years ago #

    What were you expecting?

  7. Tony Bianco
    Member
    Posted 3 years ago #

    Yup that didn't work by adding it to my stylesheet. Any other suggestions?

  8. Tony Bianco
    Member
    Posted 3 years ago #

    What am I expecting? for the plugin to not add a width to field. Seems counter productive to allow for cols and rows but then override the field with CSS and it's width.

    If the author gives you the option of being able to add cols and rows but then overrides the fields width, then what's the point? Just my 2 cents.

  9. esmi
    Forum Moderator
    Posted 3 years ago #

    I can't see that CSS on your site...

  10. Tony Bianco
    Member
    Posted 3 years ago #

    It's up there I just checked. The browser was caching that's why I didn't see the CSS override working. It still stinks that I have to do that because of the default width put there by the author.

  11. esmi
    Forum Moderator
    Posted 3 years ago #

    I agree that it's not ideal. A better approach might have been to set a width in percentages (say 98%) which would have allowed the textarea to scale according the the width of enclosing container. At least that's what I tend to do for form markup in themes.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic