how to link a hover button - html

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>

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.

Adding a link to HTML button on WordPress Astra Theme

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.

How to make links like the one in CommentPress?

If you check the websites which use commentpress for commenting (example: http://futureofthebook.org/commentpress/), you can see there is a link like:
2 comments on paragarph 1
and when you click on the link, it will show the comments for that paragraph, and if you click on the link again, the comments will hide.
How can I make those kind of link? I know if use something like:
Comment for whole article<br>
I will have a link, that if I click on it, it will take me to the another part of the page, but I want to have the same thing as I mentioned above.
I didn't find what you were referring to on that web site, but it sounds like you're describing some method of toggling visibility of an element. You can do that with either JavaScript or with CSS selectors; here's how to do it with CSS.

Changing the color of a script that doesn't contain a color code

I'm not great with html, but people I have asked are telling me it is impossible to change the color. The script comes from a separate website and is not my own. I would like to change the color of the link. All my other links are black, and I would like to keep them that way, but I want this one to be #f2f2f2. Although there isn't a color code in the script itself, is there a code I can add elsewhere to change it?
The script won't show up so I have screenshotted it and here is the link to see
<script src="http://tc.freehostedscripts.net/tcounter.php?url=kittycocaine.tumblr.com&name=x" type="text/javascript"></script>
This script is from an outside website, and is used to track activity. The website that created the script will not allow me to change anything in the script posted above.
I have total control over where I can place the script, but I would like it to show up in top left so I was just going to post it at the top of the head tags. I put the entirety of my html into pastebin in case that helps with anything
http://pastebin.com/PbuYkDbQ
Based on your question, this script is adding some url link to the page.
Is there any reason you can't style it with CSS for whatever color you want? If the inserted href doesn't include any class, you could target it to be inserted into a div with some class in it (or just re-purpose whatever element its nested in, if there are no other urls).
Your question is still unclear, but possibly what you could try is:
Surround your script with a named div, e.g. <div id="activityLink"> { your script code ... } </div>
Add a style section to the head of the html: <style> </style>
Create a CSS rule for the link color within the style block : #activityLink a { color: #f2f2f2; }
Links can have different colors depending on their state, see CSS Links page on W3schools.
If you want to do any web development, I'd strongly suggest learning CSS, a basic knowledge is quite easy to learn and very useful.
I see your file has the extension .php it has to be .js.
According to your comment, "I'm not even sure how to do that I'm sorry, what would I do?", As you said that is a file from another domain. If that domain is yours please change the file extension from .php to .js by going into your folder and right click edit it and then remove that .php and then write .js in there.
One easy way could be to search for CSS thing on google.

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.