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

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

Themes & Styling

[SOLVED] Space above anchors

Started by Jonas Nilsson 8 years ago · 4 replies · 664 views
8 years ago

Hi!

  • I'm trying to make my own modular theme inheriting from Quark.
  • I've set the header and the footer to 'display: none'.
  • I've zeroed out the margins and paddings of a lot of tags.
  • The individual custom modules have a height of 100vh because I want them to fill the whole screen.
  • I use JavaScript to click the links with a time interval, making it a presentation.

The problem is that there is still a space as high as the header above my anchors. Where does it come from?

Thanks in advance!

8 years ago

Hello,

I'm not sure that you are going for the best way.
You are still creating the element in the dom, even if you display: none; them.
Why don't you change the twig file to remove the header and the footer ?

8 years ago

It's just me not knowing what to do.

I don't want the header to show but I do want the navigation part for anchor links for my script to click.

8 years ago

I'd inspect the page in your browser's development tools. In both Firefox and Chrome at least, you can hower with the mouse over elements to see what space they occupy and check which styles are active.

Btw, there is a full page plugin. Maybe you want something like this?

last edited 04/08/18 by Oliver Scholz

Suggested topics

Topic Participants Replies Views Activity
Themes & Styling · by Pedro M, 2 months ago
4 198 2 months ago
Themes & Styling · by Ian, 2 months ago
3 94 2 months ago
Themes & Styling · by Norbert, 2 years ago
11 456 3 months ago
Themes & Styling · by Lukáš Findeis, 3 months ago
0 48 3 months ago
Themes & Styling · by Sebadamus, 4 months ago
5 128 3 months ago