Book Image

SharePoint 2013 WCM Advanced Cookbook

By : JOHN CHAPMAN
Book Image

SharePoint 2013 WCM Advanced Cookbook

By: JOHN CHAPMAN

Overview of this book

Table of Contents (19 chapters)
SharePoint 2013 WCM Advanced Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Creating a fixed width master page


The default SharePoint 2013 master page, seattle.master, expands to fill the browser window. In this recipe, we will modify the seattle.master master page to have a fixed width using CSS.

How to do it...

Follow these steps to create a fixed width master page:

  1. Open SharePoint Designer.

  2. Select Open Site. Enter the complete URL to the SharePoint site and select Open.

  3. From the Navigation pane, select Master Pages.

  4. In the list of files in the Master Pages library, make a copy of seattle.master (for our example, we have renamed it Seattle_FixedWidth.master).

  5. Check out the new Seattle_FixedWidth.master master page.

  6. Open the Seattle_FixedWidth.master master page.

  7. Locate the <head> element.

  8. Add the CSS reference to the FixedWidth.css file we will create.

    <SharePoint:CssRegistration ID="customCssRegistration" Name="<% $SPUrl:~Site/_catalogs/masterpage/resources/FixedWidth.css %>" runat="server"></SharePoint:CssRegistration>
  9. Save the master page.

  10. Check...