I am creating a new custom selling page for my shop and I would like to create a button: "Ask a seller a question". I have been Googling around, but unfortunately, I couldn't find much about it. Can anyone please share advice? The one thing I found that may work: this script; but to be honest (as I am very much a beginner), I am not sure how to link a button.
<SCRIPT LANGUAGE="JavaScript">
for (i = 0; i < document.links.length; i++)
{
if (document.links[i].search.indexOf("ShowCoreAskSellerQuestion") > 0)
{
document.write('<a href="'+document.links[i].href+'" title="ask a question">Ask seller a question</a>');
break;
}
}
</script>
The JavaScript you have will work, but it will only show up as a link. To make is look like a button you will need to add some CSS. Here you can read up on how it works. Essentially CSS will tell the HTML, or in your case the <a>
how to look. Give the tag an an id <a id="some-name">
then in your CSS do this:
#some-name{
background: url("yourImagePath") no-repeat;
height: [the height in pixels of the image]
}
This easiest thing for you would be to find a button image and add to the CSS.