Black Friday Sale! Get up to $40 off GP Premium!Learn more

[Resolved] Tailoring a Section to window size

Home Forums Support Tailoring a Section to window size

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #156915
    Mitchell

    Hi there

    I’m just wondering if there’s a way to make a section dynamically adjust its own size to match that of the window in which it is viewed?

    My end goal is something like this: remainfestival.com.au

    I’ve found a tutorial about the same idea (without GeneratePress) here (mattboldt.com/css-100-percent-height/) but I tried it out and it didn’t work for me…

    Using the Simple CSS plugin, I created a class called .fullscreen and added
    height:100%;
    as described by the tutorial above. I then added ‘fullscreen’ to the relevant Section’s custom classes. I also included the
    html, body { }
    section described in the tutorial (this was the bit I was least sure about. Maybe the problem is there?).

    Is there something about Sections that cancels out that code and prevents it from working? Or are Sections just something I shouldn’t be using to do this trick?

    I’m an absolute beginner at CSS, so there’s probably something I’m missing!

    #156916
    Mitchell

    (Also should add how great GeneratePress has been, and how impressed I am with Tom for the level of help and support provided through this forum!)

    #156917
    Mitchell

    Oops, clearly I didn’t look through the forum hard enough!

    https://generatepress.com/forums/topic/how-can-i-create-a-100-height-section/

    #156937
    Tom
    Lead Developer
    Lead Developer

    That’s definitely the best way to do it.

    Glad you found the solution – thanks for posting it in here as well 🙂

    Let me know if you have any other questions!

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.