Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I'm an old school designer just now embracing SASS. Learning all this is a lot of fun with ZEN. But, I'm having a few problems "wrapping" my head around a few things.
I can't find any documentation on making the responsive version extend full width. I would like to have the page wrapper start at 100% of available screen area rather than 100% of the zen-grid on the larger screen sizes.
I hope I'm making sense.
Easily accomplished using my old methods but not so intuitive with ZEN-GRIDS and SASS.
Thanks,
Comment | File | Size | Author |
---|---|---|---|
#2 | problem_solved_maybe.png | 58.68 KB | mdm172 |
#2 | problem.png | 48.78 KB | mdm172 |
Comments
Comment #2
mdm172 CreditAttribution: mdm172 commentedOK I think I solved my issue,
What I've done is created a page wrapper in page.tpl.php like this:
I then moved the page div just above the main div.
This took care of making my topbar and header regions full width.
For the footer to become full width, I closed the page div just after the second side bar here:
This left the footer area out of the grid but still within the page wrapper. I then closed the page wrapper after the footer wrapper.
Now, for the sass/css.
All of this was done in layouts/responsive.scss.
This being my first crack at Zen-grids, sass etc, I only knew how to solve this the way I did. If anyone can see a problem with my method, I would greatly appreciate a heads up.
I've attached before and after screenshots of the problem.
Comment #3
lilbebel CreditAttribution: lilbebel commentedHello,
This works BUT all my footer content gets moved out of the grid as the footers are no longer in the grid. So, I get the screen wide wrapper but my content is no longer contained.
How did you get yours contained?
M
Comment #4
lilbebel CreditAttribution: lilbebel commentedHello,
My solution was to add this to my .scss file:
#unique-id-of-my-block-item {
max-width: 1200px;
margin: 0 auto;
}
I will have to do this for every item and I'm not sure it's an elegant solution but I can't get anything else to work.
M
Comment #5
mike stewart CreditAttribution: mike stewart commentedhmm, I'm afraid you may be overthinking it, as zen does this by default -- but with a built-in exception for large monitors (as you seem to have noticed) -- which is a best practice in order to help with readability. I think if you open:
sass/layouts/_responsive.scss
and comment out the max-width limitation as I have below, you'll achieve what you're after. You might want to test on a new clean/vanilla subtheme.marking as fixed. please feel free to re-open if this doesn't address your issue.
Comment #6
lilbebel CreditAttribution: lilbebel commentedThanks Mike,
Your suggestion worked. Beautifully simple.
M