Jump to content

Need help with gif tag to center


Recommended Posts

I am trying to be able to click the "About me" and have the gif go to the center of the page instead of taking you to a new page


  <div class="w3-col s4">
        <p><a href="https://www.linkpicture.com/q/unnamed_10.gif"><class="w3-bar-item w3-button w3-padding" onclick="document.getElementById('newsletter').style.display='block'">About us</a></p>
        <p><a href="#">Shipping</a></p>
        <p><a href="#">Payment</a></p>

Link to comment
Share on other sites

Then don't use anchor link to that image, that will always open a new page before anything else, open a bookmark link to that id element with that img src to that  same url

<a href="#newsletter">About us</a>

<div id="newsletter"><img src="https://www.linkpicture.com/q/unnamed_10.gif"></div>



Edited by dsonesuk
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...