Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Contact Form 7 classes

  • This topic is empty.
Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #35312
    tobeeornot
    Member

    Does anyone know how to add classes to heading tags in contact form 7? I have tried using the standard and contact 7 convention for applying a class to a h2 tag but it always seems to target to the h2 in my css without a class.

    Get in Touch

    Get in Touch

    #91208
    TheDoc
    Member

    Hmmm… are you calling the contact form in a page using the shortcode or in a template? Why not just keep the heading outside of CF7?

    #91197
    tobeeornot
    Member

    In a template using the embedded code you showed me but creating the classes within the contact 7 settings area in WP.

    Was thinking of setting the heading outside the form but thought there might be a way to do it within. What do you think?

    #91198
    tobeeornot
    Member
    #91218
    mevaser
    Participant

    What I have done, let’s say, I want a two column for this plugging is:





    Half of the form here. You can add an image and a bunch of things like that in here.








    The other Half of the form here.




    Obviously, I would put that CSS in the main style sheet.

    #91219
    tobeeornot
    Member

    I think I get what you mean. The bulk of the classes are set within the form yet you can set them outside too?

    #91225
    tobeeornot
    Member

    Actually not having much luck setting the styles outside the form, either. I set a h2 class=”contact-heading” on the template above the embedded code for the CF7 and it keeps referring back to the h2 styles set for the main-content. Any ideas?

    #91228
    mevaser
    Participant

    I do not know if you know this, but if you have a CSS that is telling all H2 that if you are in the Text area behave like this or like that, you can have a hack which will overwrite that, example:



    .myhack h2 {font-size:24px!important;}

    which means that if the H2 in other places are 14px, if you put the class some where in the doc, ex:



    My Subtitle



    Then subtitle will be 24px, and not 14px.

    #91234
    TheDoc
    Member

    Just want to point out that “.myhack h2” will not target the HTML that you posted. You would need to use “h2.myhack” or just “.myhack”.

    #91246
    tobeeornot
    Member

    Thanks Doc

Viewing 10 posts - 1 through 10 (of 10 total)
  • The forum ‘CSS’ is closed to new topics and replies.