changing head-banner size

  • Unknown's avatar

    I’ve been trying to change the size of the head-banner of my site for quite a long time. I want to change its height to 800 px. I can change it on my computer but not in the CSS of wordpress. I’m using port theme.

    The blog I need help with is: (visible only to logged in users)

  • Unknown's avatar

    The height is set via javascript so it can be a bit tricky to override. Also it’s set to be dynamic based on the size and orientation of the screen it’s being viewed on (so that your visitors don’t have to scroll endlessly to reach your actual content).

    What CSS have you tried that worked locally and what sort of effect are you trying to achieve?

  • Unknown's avatar

    I tried to make it smaller, because now it is filling up the whole screen. I believe it now is 1337 px, and I find it too big.

    <div id=”home-banner” class=”has-background” style=”height: 1321px; background-position: center -165.333px;”>
    <div id=”down-button”></div>
    </div>

    here I can change the height, bus in CSS it wont work

  • Unknown's avatar

    Try resizing your browser window or viewing your site on a tablet or smartphone and you’ll find the image still takes up the availabe screen space. Are you trying to reduce the height of the image just on larger screens? This still might be tricky due to the way the theme is designed specifically to adjust the image to match the screen height, but let me know.

  • Unknown's avatar

    I want to reduce size on every device. Not just on larger screens. It takes up all the screen now and I want to reduce its height so you can see some other content as well

  • Unknown's avatar

    Can you see what I mean on my website?

  • Unknown's avatar

    In my own browser I can change it, but when I try it on the CSS section it doesn’t work

  • Unknown's avatar

    I can’t see a good way to do this, as it is a premium theme you could try asking the theme author on the Port theme support forum as they would be best placed to help. If I think of anything I’ll let you know.

  • Unknown's avatar

    You can override the javascript-added height with something like the following:

    #home-banner {
      height: 800px!important;
      background-size: contain;
      background-color: #fff;
    }

    but that will be set for all devices and you might not want to make it so big on mobiles.

  • Unknown's avatar

    Thank you, I believe it worked! I think it is fixed now. Thank you so much for helping! <3

  • The topic ‘changing head-banner size’ is closed to new replies.