+
+
+ <%= image_tag 'herotest.png', class: 'herotest-image', alt: '' %> +
+ +
+
+
+

True full width

+

This image is true full width. It will always be the full width of the browser window.

+
    +
  • Good: true full width image
  • +
  • Bad: no control over image height, so this box could overlap onto content below on smaller screens
  • +
  • Bad: position of content in the image varies, so this box could obscure people's faces
  • +
  • Bad: image height scales with browser size, so for large screens maybe no page content is seen on page load, only image
  • +
  • Bad: to make the image look good, needs a very large filesize
  • +
  • Bad: breaks page layout before image has loaded, or if it fails to load
  • +
+
+
+
+
+ +
+
+ <%= image_tag 'herotest.png', class: 'herotest-image', alt: '' %> +
+ +
+
+
+

Full width up to a limit

+

This image is wide but limited (to 1200px), after which a gap will appear either side of the image.

+
    +
  • Good: height of image doesn't change
  • +
  • Good: position of content within image much more static
  • +
  • Bad: gap either side of the image for some users (a background colour can improve this as shown, particularly if the colour is similar to the image)
  • +
  • Bad: some control over image height, but this box could still overlap onto content below on smaller screens
  • +
+
+
+
+
+ +
+
+ <%= image_tag 'herotest.png', class: 'herotest-image', alt: '' %> +
+ +
+
+
+

Full width with fixed height (chosen option)

+

+
    +
  • Good: height is fixed
  • +
  • Good: position of content is known
  • +
  • Bad: won't be full width on largest screens
  • +
  • Bad: image content is lost either side as browser gets narrower
  • +
+
+
+
+
+ + +
+
+ <%= image_tag 'herotest.png', class: 'herotest-image', alt: '' %> +
+ +
+
+
+

True full width with fixed height

+

+
    +
  • Good: true full width
  • +
  • Good: image content is mostly predictable
  • +
  • Bad: bottom of image is lost on larger screens
  • +
  • Bad: image leaves a gap underneath on smaller screens
  • +
+
+
+
+
+ +
+
+
+ <%= image_tag 'herotest.png', class: 'herotest-image', alt: '' %> +
+
+ +
+
+
+

Full width, fixed height, fade out

+

+
    +
  • Good: height is fixed
  • +
  • Good: position of content is known
  • +
  • Good: fade out helps reduce jarring edge of image on large screens
  • +
  • Bad: won't be full width on largest screens
  • +
  • Bad: image content is lost either side as browser gets narrower
  • +
+
+
+
+
+ +