Stretch featured header image

  • Unknown's avatar

    Hi,
    My featured header image is centered with the Gazette theme. To me, it’s not as aesthetically pleasing as it would be if the image stretched the width of the screen. Is there a way to do this seamlessly so that it works well for computer and smartphone?

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

  • Unknown's avatar

    It would also be great if the header image took up more screen in general and maybe even bordered with the top menu. Thanks!

  • Unknown's avatar

    Hi there, if only every theme were this easy to do this on. Go to Customize > CSS, delete all the informational text in that window, and paste in the following custom CSS to make the header image full width on Gazette.

    .header-image-inner {
      width: 100%;
    }
    .header-image-inner img {
      width: 100%;
    }
  • Unknown's avatar

    The gap between the menu and the header image is a top margin on the header image parent div. Add the following to close that up.

    .header-image {
      margin-top: 0;
    }
  • Unknown's avatar

    Thanks so much! Works perfectly. One more question: Below the featured header image, I’d like to add a home page “welcome” text box… one that is between the header image and the featured blog posts. Can this be done? And will it be possible to choose the font type?

  • Unknown's avatar

    A code that can place a text box between the main menu and featured header image would be appreciated as well if possible. Thanks so much for the help.

  • Unknown's avatar

    You can give this a try. It is typically only used for a few words, and not a large block of text, and although you can set a font, it would have to be either one of the ones set at Customize > Fonts, or a font that is typically installed on all computers. Here is a site that shows the common fonts for Windows and Mac.

    #primary:before {
    	content: "This is a welcome";
    	display: block;
    	text-align: center;
    	margin-top: 20px;
    	font-size: 110%;
    }
  • Unknown's avatar

    It works but the message shows up on every post, not just the home page. Can that be altered?

  • Unknown's avatar

    Oops, I forgot to add the “home” CSS class to the beginning to limit this to only the home page. Use this instead.

    .home #primary:before {
    	content: "This is a welcome";
    	display: block;
    	text-align: center;
    	margin-top: 20px;
    	font-size: 110%;
    }
  • The topic ‘Stretch featured header image’ is closed to new replies.