Site logo

Archived topic

Tailoring a Section to window size

3 replies · Started by Mitchell on November 30, 2015

Viewing posts 1–4 of 4

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!

(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!)

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!

This archived topic is closed to new replies.