Jump to content

Recommended Posts

Put an element with an id attribute on the page at the point where you want the browser to scroll to.

<div id="destination">Destination</div>

Then put a link that goes to that element:

<a href="#destination">Go to destination</a>


Link to post
Share on other sites
  • 2 weeks later...

To centre text and inline elements <a>..</a>, it must be within a block element paragraph <p>...</p>, or  <div>...</div> , and that block element must use text-align: center;

OR turn inline element '<a>' then use 'text-align: center;' on that. but note the link will stretch from left to right, unless you give it a specific fixed width, and use margin: 0 auto;


Edited by dsonesuk
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...