In this recipe, we will modify the seattle.master
master page to have padding added around the expanding width content for a contained look that still expands with the browser window using CSS.
Follow these steps to create an expanding width master page with content padding:
Open SharePoint Designer.
Select Open Site. Enter the complete URL to the SharePoint site and select Open.
From the Navigation pane, select Master Pages.
In the list of files in the Master Pages library, make a copy of
seattle.master
(for our example, we have renamed itSeattle_ExpandingWidthWithPadding.master
).Check out the new
Seattle_ExpandingWidthWithPadding.master
master page using the Check Out feature.Open the
Seattle_ExpandingWidthWithPadding.master
master page.Locate the
<head>
element.Add the following CSS reference to the
ExpandingWidthWithPadding.css
file we created:<SharePoint:CssRegistration ID="customCssRegistration" Name=...