# Jumping page on portfolio

**URL:** <https://forum.freecodecamp.org/t/jumping-page-on-portfolio/69700>\
**Category:** General\
**Created:** [December 27, 2016, 7:53pm UTC](https://forum.freecodecamp.org/t/jumping-page-on-portfolio/69700 "2016-12-27T19:53:38Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![kumar-sharma](https://avatars.discourse-cdn.com/v4/letter/k/13edae/32.png) [@kumar-sharma](https://forum.freecodecamp.org/u/kumar-sharma)\
**Post date:** [December 27, 2016, 7:53pm UTC](https://forum.freecodecamp.org/t/jumping-page-on-portfolio/69700/1 "2016-12-27T19:53:38Z")

</div>

Hello everyone,

This is my first time posting a question on this forum. I hope this is the right way to do it.  
I am making my portfolio on code pen. [Link’s here](http://codepen.io/kumar-sharma/full/VmJQZm).  
And I am having issue when I try to click a button and have my page scroll to a certain location.  
At the top of my page, I have a button called “Middle” which is supposed to scroll to the middle of the page.  
button\> a href="#middle"\> /a\> Middle /button\>  
a id=“middle”\>Middle /a\>  
I had to take “\<” out so that the post can show my code.  
But I have not been able to make it work. Is there something wrong with my code?

---

<div class="post-metadata">

**Author:** ![timotheap](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/timotheap/32/26039_2.png) [@timotheap](https://forum.freecodecamp.org/u/timotheap)\
**Post date:** [December 27, 2016, 8:30pm UTC](https://forum.freecodecamp.org/t/jumping-page-on-portfolio/69700/2 "2016-12-27T20:30:59Z")

</div>

You should enclose your `button` tags WITHIN the `<a>` tags and then it works.

You can also simply style your `<a>` link like a button…or give it a `class="btn">`, which requires bootstrap.

---

<div class="post-metadata">

**Author:** ![kumar-sharma](https://avatars.discourse-cdn.com/v4/letter/k/13edae/32.png) [@kumar-sharma](https://forum.freecodecamp.org/u/kumar-sharma)\
**Post date:** [December 27, 2016, 8:36pm UTC](https://forum.freecodecamp.org/t/jumping-page-on-portfolio/69700/3 "2016-12-27T20:36:28Z")

</div>

That worked!!! Thank you so much.

Should I always have other elements enclosed in my anchor elements?

---

<div class="post-metadata">

**Author:** ![timotheap](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/timotheap/32/26039_2.png) [@timotheap](https://forum.freecodecamp.org/u/timotheap)\
**Post date:** [December 27, 2016, 8:48pm UTC](https://forum.freecodecamp.org/t/jumping-page-on-portfolio/69700/4 "2016-12-27T20:48:45Z")

</div>

hmmmm I don’t know 😊 I’d say yes but actually it depends on the element.

If you look up the[MDN html elements for `<a>` tags](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a), it will tell you what content it can accept or not…and it seems that `button` is accepted, so I don’t know.

---

<div class="post-metadata">

**Author:** ![kumar-sharma](https://avatars.discourse-cdn.com/v4/letter/k/13edae/32.png) [@kumar-sharma](https://forum.freecodecamp.org/u/kumar-sharma)\
**Post date:** [December 27, 2016, 8:50pm UTC](https://forum.freecodecamp.org/t/jumping-page-on-portfolio/69700/5 "2016-12-27T20:50:44Z")

</div>

That helps! Thank you again.

---

<div class="post-metadata">

**Author:** ![jwilkins.oboe](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/jwilkins.oboe/32/179497_2.png) [@jwilkins.oboe](https://forum.freecodecamp.org/u/jwilkins.oboe)\
**Post date:** [January 16, 2021, 6:11am UTC](https://forum.freecodecamp.org/t/jumping-page-on-portfolio/69700/6 "2021-01-16T06:11:14Z")

</div>

Closed on January 16, 2021, 6:11am UTC


