Skip to main content
All CollectionsWebsite BuilderDesign
Website Builder: How to Display a Section in Full Width
Website Builder: How to Display a Section in Full Width

Displaying website sections in full width with Hostinger Website Builder

Updated over a month ago

All website templates that are available with Hostinger Website Builder follow responsive web design that ensures the best user experience across all devices. Responsive web design means that your website content will automatically adapt – slightly stretch or shrink – depending on your website visitor's device properties (its screen size, resolution, etc.). You can learn more about it here.

To display full width sections your website to have the sides or edges of your website fully streched, you would be disabling part of the responsive layout by adding the codes below, so have in mind that depending on the visitor's device properties, the displayed content result may distort your website's layout.

The changes described below are not visible within the editor. To check them, access the preview mode of your website or visit it online 💡

Display All Sections in Full Width on Both Desktop & Mobile

Copy the code below:

<style>
.block-layout, .block-layout--layout {
max-width: none !important;
padding: 0 !important;
}
</style>

Finally, go to your website's SettingsIntegrations, and paste the code in the Custom code field. Then, save the changes and update your website.

Display a Specific Section in Full Width

To make changes to a particular section only, you need to know the section ID. You can find it by inspecting your page with the help of developer tools in your browser:

Inspecting a page

On Both Desktop & Mobile

Copy the code below:

<style>
#sectionID div:nth-of-type(2) {
max-width: none !important;
padding-inline: 0 !important;
}
</style>

In the code, replace the sectionID with the actual ID of the section in question.

On Desktop

Copy the code below:

<style>
@media screen and (min-width: 920px) {
#sectionID div:nth-of-type(2) {
max-width: none !important;
}
}
</style>

In the code, replace the sectionID with the actual ID of the section in question.

On Mobile

<style>
@media screen and (max-width: 920px) {
#sectionID div:nth-of-type(2) {
max-width: none !important;
padding-inline: 0 !important;
}
}
</style>

In the code, replace the sectionID with the actual ID of the section in question.

Finally, go to your website's SettingsIntegrations, and paste the code in the Custom code field. Then, save the changes and update your website.

The full width section can be applied to all sections inside the website except the header section.

Did this answer your question?