Adding a link to HTML button on WordPress Astra Theme - html

I posted the same question earlier today that was closed but the problem I have has not been resolved.
Problem:
I am trying to add a link to a HTML main menu button on a WordPress Astra theme. If I use the following code the button is displayed with the correct formatting but does not link to the page I need it to:
<button class="wpmem_loginout" >Sign-In</button<>
If I use the suggested code that was provided in my last post:
Sign-In
The formatting of the button is removed but the link works as it should. I have included a picture of what I mean when I say formatting. The section on the left is with the format removed and the section on the right displays the button as it should look (Red with white text).
Does anyone have any further suggestions? I have also tried to use the suggested code and add CSS after to format the button properly. But that did not work either...
Thanks,
Guy

The button for you is not working because it has no functionality associated with it. Just add onclick function and change the location href to your required url. It will work fine.
<button class="wpmem_loginout" onclick="window.location.href='/sign-in'">Sign-In</button<>
Hope it helps. Revert for any doubts.

Related

Buttons not working with localhost/xxxxx.html

I have written a code for my html website project. When I open the html file itself, it loads correctly on various browsers. However, when I try to access the same file via localhost/xxxxx.html, the buttons don't seem to work. Other images and links work fine. All the files are placed within the same folder.
I have used a href along with the button element.
Can someone please help me? The project is due tomorrow and I am not a technology/coding native.
TIA!
The button element will not redirect you to the link you want because that's not what it is built for.
As you said, your link works fine, so you can use your link to navigate.
If you still want to use the button element, you can wrap it with the <form action="the_link_you_want_to_navigate" method="GET">. You can also use JavaScript code with a click event listener too.
But I think the best way to do this is by using the <a> tag and make it looks like a button using CSS properties.
Without seeing all your code it's tough to know why it's not working in your localhost. But... within the <button> element it's not typical to add an href the same way you would with an <a>. You can do it but with an onclick event in javascript.
I would suggest doing an Text and styling the .button class in your css.
Hopefully this helps and good luck on your project.

Linking from one webpage to a specific section on another webpage

I have two webpages, one is index.html and the other is shop.html.
I am trying to link from shop.html to a section with the Id of #contact in index.html. They both share the same navbar. They are both in the same folder called "Mobile".
This is the code that I am using.
This is the code for the contact link that is on the navbar shared by both pages, but I am trying to accesss it from the shop.html.
<li>CONTACT</li>
I have managed to get it to work once, but that was only by right clicking and opening the tab in a new window.
I'm not sure if this works, but you can try:
Contact
This will force it upon opening it in a new tab. However, it should be working only doing
Contact
Try this:
<li>CONTACT</li>
By default, your browser should have target="_blank" as shown in the Firefox documentation. It may just be an issue with having your list tags wrapped around the anchor tag. If you post the CSS and HTML you are linking to in index.html, I can make sure this works.
Thanks for the help, turns out it was a jquery smooth scrool animation messing with it.

how to link a hover button

I found some html and css that produces some nice hover buttons that I'd like to use. I was able to change the button text to be relevant to my site.
All I need to do is make these buttons link to he desired pages.
I've tried simply looking for the example link and substituting mine.
I've tried adding a basic html line of link code in many places in the sample code.
I've created similar buttons with Expression Web's "Interactive Button" generator but have never been able to modify them.
That generator asks where the link should go and I input it and it works. I've never reverse engineered it to understand how to modify it. I just delete it and start over. This is it: http://boundtotease.com/testing/index3.html
You can do like this
<button onclick="window.location='http://www.naveedramzan.com'">Click Me</button>

Edit html error on tumblr.

Why doesn't work the Edit Html section on Tumblr? When I go to the Customize section I click the edit html button and.. nothing happens. Could you help me please?
If it still isn't working, you could also possibly try opening the site in a different browser.

Display menu while clicking image button in ruby?

i want to display the menu while clicking image button & should hide menu(click again)
in Ruby/ HTML
Like Windows Start button
This is html/js issue. See this page: http://www.1stwebdesigner.com/css/38-jquery-and-css-drop-down-multi-level-menu-solutions/
I recently followed the following tutorial, http://www.noupe.com/tutorial/drop-down-menu-jquery-css.html, and found it to be a good one. All the HTML / CSS / JS is laid out very clearly, and the example is bare-bones enough that's it's very easy to customize to make it look exactly how you want it.