Anchor points in HTML

I'm fairly basic when it comes to coding websites, but I wanted to incorporate anchor points in to my horizontal scrolling website. I've had a go but it isn't working.

Below is the code I've tried - I'm not sure if it's something to do with my navbar not being the standard <li> instead im using separate divs. I will include an image of how i'm designing the site so that you can understand the concept.

HTML:

<div id="navbar">
    <div class="tab1" href="#home">
        <div class="text1">Home</div>
    </div>
    <div class="tab2" href="#work">
        <div class="text2">Work</div>
    </div>
    <div class="tab3" href="#about">
        <div class="text3">About</div>
    </div>
</div>
<div id="container">

<div id=“fullscreen”>

&lt;div class="box home" id="home"&gt;

&lt;div class="heading"&gt;
    &lt;h1&gt;Hi,&lt;/h1&gt;
    &lt;h2&gt;I'm Nathan Wilson&lt;/h2&gt;
    &lt;h3&gt;a Graphic Designer based in Nottingham, U.K.&lt;/h3&gt;
&lt;/div&gt;

&lt;/div&gt;

&lt;div class="box work" id="work"&gt;

&lt;/div&gt;
&lt;div class="box about" id="about"&gt;

&lt;/div&gt;

</div>
</div>

Image: https://imgur.com/fh6hq3O

I want to incorporate smooth scrolling eventually, but that’s something I’ll look in to once i’ve fixed this issue.

#html #css

1 Likes1.60 GEEK