Skip to content
Grav 2.0 is officially stable. Read the announcement →
Archive

Fixed width container for Antimatter child

Started by Muut Archive 10 years ago · 1 replies · 293 views
10 years ago

I've tried following the instructions here to create a centred, maximum width container on my site. It works when I disable slidebars.min.css but not otherwise, and of course disabling slidebars messes with the presentation in the footer, for some reason.

I can't seem to determine a more specific selector. Would it be best to add a new selector in the template, or is there some better approach?

Thanks

10 years ago

You can use the following rules to change the default desktop browser display of Antimatter. You'll probably need to mess around with the explicit widths, but this will get you most of the way.

These can be added to either your _custom.scss or custom.css.

CSS
// Over-ride default Antimatter behavior of full-browser-width
#sb-site,
.sb-site-container,
.sb-slidebar,
body,
html {
  max-width: 1200px;
  margin: 0 auto !important;
}

#header #navbar {
  max-width: 1000px;
}

.scrolled#header { 
  left:0;
}

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 1357 9 years ago
Archive · by Muut Archive, 9 years ago
2 936 9 years ago
Archive · by Muut Archive, 9 years ago
2 4066 9 years ago
Archive · by Muut Archive, 9 years ago
1 2954 9 years ago
Archive · by Muut Archive, 9 years ago
3 1120 9 years ago