How to decrease height on front page 1 (featured section 1 background image)

Homepage Community Forums Guru Theme Support How to decrease height on front page 1 (featured section 1 background image)

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #20589
    Pete
    Customer

      Hello, I am trying to decrease the height of front page 1 (section 1 background image) on the homepage page to the size of 600px in height with no luck so far.

      Where and how do I change this on the style.css?

      Would appreciate any help.

      Thanks,

      #20599
      Wes
      Moderator

        There’s a couple ways to do it. The easiest way is to limit the maximum height in the CSS around line 1523 –

        .front-page-1 {
        	max-height: 740px;
        	position: relative;
        }

        Let me know if that helps.

        #20627
        Pete
        Customer

          Hi Wes, yes that works! However, I noticed that while the copy is aligned perfectly in the middle when viewing the page on a macbook pro once I view the page on a desktop monitor (larger screen) the copy returns to the bottom of the section. Also, when looking at the background image on the desktop I noticed that only 3/4 of the image is showing which I assume is affecting where the copy is placed.

          How do I make sure that the copy and image on front page 1 is consistent regardless of screen size?

          Thanks again for your help!

          #20641
          Wes
          Moderator

            What’s the link to your site again? I can take a look at it and adjust my browser to see which part of the CSS is causing it to do that.

            #20643
            Pete
            Customer
              This reply has been marked as private.
              #20680
              Wes
              Moderator

                Ok, now I see. You may have to remove part of the code for that section in the homepage. There is code added which is designed to make the widget/background image flexible and adjust for different browser sizes on the homepage. What you’ll probably want to do is remove that code and manually add in a fixed padding.

                Look in your front-page.php file and remove or Comment Out this line –

                wp_enqueue_script( 'aspire-script', get_bloginfo( 'stylesheet_directory' ) . '/js/home.js', array( 'jquery' ), '1.0.0' );

                If you want to leave the code in, and just “Comment it Out”, then do this –

                /*wp_enqueue_script( 'aspire-script', get_bloginfo( 'stylesheet_directory' ) . '/js/home.js', array( 'jquery' ), '1.0.0' );*/

                Then you can manually add in the padding for that section by adding something like this –

                .front-page-1 .flexible-widgets {
                    padding: 25% 0 200px;
                }

                It may not show up perfect at first, but you can adjust the padding from a percentage to a fixed size (px) to get it to look exactly how you want it. This is what I did in another theme to get it working.

              Viewing 6 posts - 1 through 6 (of 6 total)
              • You must be logged in to reply to this topic.