I'm using Bootstrap to create a single page portfolio, I'm using bookmark links to navigate the page, however I want the page to land earlier than the position it lands on, I am pointing to the div I assigned the Id to it. is there anyway to do it?
Let's say, you want to go to footer on click of Goto Footer link
Goto Footer
Then, the footer block should have
<div id="footer-block">Page Footer</div>
Related
I'm doing a React project and I want to redirect to #categories div on main page...when I click on a link on navbar of the main page (where #categories div is) it works, but when I click on that link on another page (categories div is on another page and it should redirect me to localhost:3000/#categories), the href is good but it only redirects me to that page, not to categories div on the page.
I have tried writing a function to do it and also checked if the div name (id) is correct, checked if link works and everything.
Does anyone know how to solve this?
Thank you.
You cannot redirect to a div instead use section tag
<section id="categories">
<div></div>
</section>
Now the same localhost:3000/#categories href would work. Read More
There are few links on a page, when the user clicks on a link it should redirect to the new page, As of now it is redirecting to the new page but the issue is that the new page doesnot scroll to top and it stays at the same location where the user clicked the link on the old page. The new page scrolls to top only when the page is refreshed. How to solve this issue?
if you using ng-view to show your navigate page then can try using autoscroll="true"
<div ng-view="" autoscroll="true"></div>
Add an id to one of the top elements of the page. For example:
<div id="mytopdiv"></div>
And then you can add "#mytopdiv" to the end of the url for redirecting. For example: "http://www.mypage.com#mytopdiv"
My problem goes like this.
I have a tab on the left side and the content for each tab shows in the right side.the tab extends long way down so I should use page scroll to get bat to the top in order or the content to be viewed but I cant scroll and load the same time.
So whats happening is I need to double click the tab to load and scroll to the id to the top.can someone help me with this?
perhaps you could wrap the tabs in an anchor tag with href: and wrap the content in a div tag with the id <div id="content"></div>, this way, when you click on the tab it will redirect you to the content div without having to scroll yourself.
hi guys can any one have idea whenever i click from footer link a new page will be open and the will scroll to a specific content below is the screen shot. Condition is the website is in yii framework and nothing others.
You can create an anchor in your HTML with <a id="some-content"></a> and change the location to some/action#some-content.
using <a> you can create that functionality
<a id="travel">Travel Privileges</a>
and try to add #travel in the location bar
Ex:
http://somedomain/privileges#travel
I have a footer section on my website where I want to include a back to Top link.
Problem is that it can't detect on which page of the site the user is so it sends it in the index html top. Is there any way to achieve this?
I can't use Back to top since I have a base href that links to the index page of the website.
This code worked well, cross browser too:
TOP
Add a named anchor in your page just before the content, to specify the top of your current page. Like:
<a name="top"></a>
<!-- Rest of your content here -->
Then in your footer, link to the anchor with:
Back to top
You don't need php for this.
Just add a link like this:
Back to top