What is JotForm?
JotForm is a free online form builder which helps you create online forms without writing a single line of code. No sign-up required.

At JotForm, we want to make sure that you’re getting the online form builder help that you need. Our friendly customer support team is available 24/7.

We believe that if one user has a question, there could be more users who may have the same question. This is why many of our support forum threads are public and available to be searched and viewed. If you’d like help immediately, feel free to search for a similar question, or submit your question or concern.


  • Profile Image

    Problems changing image height with CSS

    Asked by betwrestling on March 23, 2017 at 04:18 PM

    I am trying to change the height of an image with CSS code however for some reason it doesn't seem to be working. I can change the width fine, but not the height. Is this the correct code?       

     

    img.form-image {

            width : 68%;

              height: 10%;

        }

    Page URL:
    https://form.jotform.co/70773161313854

  • Profile Image
    JotForm Support

    Answered by Kiran on March 23, 2017 at 07:01 PM

    Could you try having the height as auto to see if that helps?

    img.form-image {

            width : 68%;

            height: auto;

    }

    Please get back to us if the issue still persists. We will be happy to help. 

  • Profile Image

    Answered by Predictwrestling  on March 23, 2017 at 11:07 PM

    Thanks for that however I only want the width and height to change when viewing it on mobile devices, so having it automatic wouldn't work.

  • Profile Image
    JotForm Support

    Answered by BJoanna on March 24, 2017 at 04:11 AM

    If you want to change the size of you image only on mobile devices you will have to use @media query

    If you want to find out more about media query CSS codes targeting different devices, here’s one good source. http://stephen.io/mediaqueries/

    For example you can use try with this CSS code:

    @media screen and (min-width: 10px) and (max-width: 540px){

    img.form-image {

              width : 68%;

              height: 10%;

        }

    }

    Hope this will help. Let us know if you need further assistance.