- This topic is empty.
-
AuthorPosts
-
December 6, 2018 at 5:43 pm #279961sgt_spikeParticipant
I am designing a page based on the grid and using the example “The Holy Grail Layout” (https://css-tricks.com/css-grid-one-layout-multiple-ways/) with a little variation. I want just the center scroll. So basically the header, footer and both sidebars have a fixed position. The main section in the middle needs to be able to scroll. The only I’m able to do this is have the main section position absolute but then it reduces the width of that grid. Check it out at https://family.spikedevelopments.com/holiday/2018/index.html and please let me know how I can achieve this.
December 6, 2018 at 9:27 pm #279963BeverleyhParticipantI haven’t looked at the link – no point, on mobile – but based on description alone, what if you used a wrapper
div
inside ofarticle
and do your positioning/scroll stuff on that instead?To attract helpful responses, try mocking up the issue in a reduced CodePen demo – code is easier for us to troubleshoot there (we’re not restricted to the developer toolbar), and doesn’t come with the weight of all the extra code and distractions of a full website. Note that we only need the minimal amount of JS, CSS and HTML to illustrate the problem. We don’t need your whole codebase.
December 7, 2018 at 5:28 am #279965sgt_spikeParticipantMy bad…I can see how a link would be scary to click on….Anyway the code pen is here
https://codepen.io/sgt_spike/pen/ebOJEG
The center doesn’t seem to scroll all the way to the end
December 7, 2018 at 11:24 am #279977BeverleyhParticipantScrolling panels don’t display well in Safari in mobile so I can’t see the issue directly but did you see/try what I wrote previously?
what if you used a wrapper
div
inside ofarticle
and do your positioning/scroll stuff on that instead?Except
article
was the element in the Holy Grail tutorial. In your demo it would besection
.December 7, 2018 at 12:28 pm #279978Paulie_DMemberThe problem as I see it is that you are using absolute or fixed positioning which causes overlay/
That probably isn’t necessary with CSS-grid.
A much reduced demo of just the essential components and CSS would be ideal. You seem to have dropped the whol codebase in there.
December 8, 2018 at 8:16 am #279996sgt_spikeParticipantAre you say to drop the grid altogether and use a more native layout?
I changed the section to an article element. Not much difference. I researched the difference in the two.
I wrapped the elements of the article in a div and it did allow for the scroll of the main section. But using a grid, I would think the grid would stay in tact using position. I will post my changes in the pen used above.
December 8, 2018 at 9:20 am #279998BeverleyhParticipantLike Paulie_D said, a much reduced demo would be easier for us to work with and offer suggestions for. If you edit your CodePen above, please pare it back so that only the basic structural HTML elements exist, along with very minimal CSS for just that structure, and the immediate layout problem. Also remove any non-critical styling such as fonts, font colours, images, etc.
December 10, 2018 at 8:33 am #280023sgt_spikeParticipantI believe I have what I’m looking for in regards to the center row.
https://codepen.io/sgt_spike/pen/JwoXZz
My only desire is to have the entire grid fit in the viewport. Mainly the height. The width works. the grid stretches to the full width of the viewport. How do I get the height to do the same and be responsive?
December 10, 2018 at 9:21 am #280026 -
AuthorPosts
- The forum ‘Design’ is closed to new topics and replies.