The main page will feature just a few buttons that will display specific content to the user.
These buttons within #home
will not be in the header, so they will only be visible on the #home
section.
<section id="home">
<a href="#content">content</a>
<a href="#something">something</a>
<a href="#someelse">someelse</a>
</section>
<section id="content">
<section id="something">
<section id="someelse">
I discovered the :target
method in CSS which is simple to use and works well, but the #home
section does not appear.
It seems like it will only function correctly with a fixed header outside the section
element.
section {
display: none;
}
section:target {
display: block;
}
Each section other than #home
will have a back button that redirects the user back to the #home
section. This was easily achieved using the :target
method by simply using a href="#"
, and it worked effectively.
Are there any other methods I could utilize for this purpose?