Have you ever wanted to create a striking, full-width banner for your SharePoint site, but weren't sure how to achieve the perfect size? You're not alone. SharePoint's inherited styles can sometimes feel restrictive, but with a little creative coding, you can unlock its full potential. In this guide, we'll explore how to create a full-width section banner in SharePoint that's both visually appealing and SEO-friendly.

SharePoint's responsive design ensures your website looks great on all devices. However, by default, the maximum width of a SharePoint banner is limited to the container's width. But don't worry; we can easily break these boundaries by adding some custom CSS.

Understanding SharePoint Banner Sizes
Before we dive into creating a full-width banner, let's understand SharePoint's default banner sizes. By default, SharePoint uses a 16:9 aspect ratio for banners, with a maximum width of 1366px. This is perfect for most use cases, but what if you want a wider banner that spans the full width of the browser?

To achieve this, we'll need to override SharePoint's default styles and create a custom CSS class for our full-width banner.
Creating a Custom CSS Class

First, navigate to your SharePoint site's styling options and create a new CSS file. You can do this by clicking 'Edit File' in the 'master page' or 'Composed looks' section of your site's settings. Add the following CSS to your new file:
.full-width-banner {
max-width: 100% !important;
width: 100% !important;
}
Applying the CSS Class to your Banner
Next, apply this new class to your banner. If you're using the 'Image' web part, you can do this in the 'Design' pane. If you're using a content editor web part, you'll need to edit the HTML directly. Here's how:

- Click on your banner, then click the 'Edit' button that appears. This will open the 'Rich HTML Editor' panel.
- In the '_split view' tab, you'll see the HTML for your banner. Add the class .full-width-banner to the 'img' tag, like this:
<img class="full-width-banner" src="URL_TO_YOUR_IMAGE" alt="DESCRIPTION_OF_IMAGE">
Optimizing Banner Images for SEO
Creating a full-width banner is just the first step. To ensure your banner drives traffic and engagement, you need to optimize it for SEO. This involves using descriptive alt tags, compressing images for faster load times, and choosing the right file format.

Why are these steps important? SEO-optimized images can significantly boost your site's visibility in search engine results. Plus, they make your site more accessible to visually impaired users using screen readers.
Using Alt Tags







Always include an alt tag with your banner images. This provides a textual description of the image, which both screen readers and search engines use to understand the content of the image. Here's how you can add an alt tag in SharePoint:
- In the 'Rich HTML Editor' panel, select the 'img' tag that contains your banner image.
- In the 'Properties' pane, you'll see an 'Alt' field. Add a descriptive, keyword-rich description of your image.
Compressing Images
Large images can slow down your site's load times, which can negatively impact your SEO and user experience. To compress your images, use a tool like TinyPNG or Squoosh. Compressing your images won't reduce their quality, but it will significantly reduce their file size.
And there you have it! With a bit of custom CSS and some SEO best practices, you can create stunning, full-width section banners in SharePoint that engage your users and boost your site's search visibility. Happy SharePoint-ing!