Link to home
Start Free TrialLog in
Avatar of Wanda Marston
Wanda MarstonFlag for Canada

asked on

Button not appearing on web page

I had a working "Contact Us" button and then moved some coding around and now the script appears as text on the browser instead of as a button.

Please contact us to answer any questions about planning an event at xxxxxxx.</p>
[buttonhref="http://www.xxxxx.co/trada/contact/"]contact us[/button]
[/one_half][one_half class="" margin="" padding="" id="" bg_color=""]
<img class="aligncenter" src="http://www.xxxxxx.co/trada/wp-content/uploads/2018/12/LaPolenta.jpg" alt="pond" width="100%" height="100%" />
[/one_half][one_half class="" margin="" padding="" id="" bg_color=""]

Open in new window

Avatar of Devin Becker
Devin Becker
Flag of United States of America image

Wanda,

I'm not sure exactly how you have your css set, but I think in general this is what you want:
<button onclick="location.href='https://google.com'">contact us
</one_half><one_half class="" margin="" padding="" id="" bg_color="">
<img class="aligncenter" src="http://www.apimages.com/Images/Ap_Creative_Stock_Header.jpg" alt="pond" width="100%" height="100%" />
</one_half><one_half class="" margin="" padding="" id="" bg_color="">
</button>

Open in new window


It's also worth noting that HTML uses arrow brackets instead of square( < instead of [ ).

Hopefully this helps,

Devin Becker
I think @Wanda is using some template engine here, this is not a plain HTML.
ASKER CERTIFIED SOLUTION
Avatar of lenamtl
lenamtl
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Wanda Marston

ASKER

Yes, you are right Zakaria, I believe that there is some kind of template involved. The BIG thing is the original web tech person is not available so I am trying to help out a friend update their website with some changes before we decided to make a huge step in proceeding with another method of delivering this site. I am used to PHP and HTML.

Anyway, I was testing out some spacing and the button was working with a rollover effect and then I moved something around and it now the script comes up as text on the browser.

I will try a few of the other suggestions. I don't think much of WordPress and don't think it is any easier than just using Dreamweaver or KomPozer, for instance.
Ok then you should check your javascript code for errors

in Chrome right click / Inspect and check console tab for errors.
I don't have Chrome. On a Mac with Safari and Firefox.
ok then with Firefox
choose Tools > Web Developer > Inspector
https://developer.mozilla.org/en-US/docs/Tools/Page_Inspector/How_to/Open_the_Inspector
then check in console
Hi @wanda, normally the button tag has no href property in the HTML ( it may do in the WordPress notations ) but I would suggest the use of an anchor instead, something like :

<a href="http://www.xxxxx.co/trada/contact/">contact us</a>

Open in new window


Else if there's a style attached to the button tag you could always use onclick like :

<button onClick="location.href='http://www.xxxxx.co/trada/contact/'">contact us</button>

Open in new window


It may be helpful to share with us a screenshot of what you get right now as output.

Do you have the backup version of this part when it was working just fine?
In fact as the theme is using Bootstrap 3 it should  be something like this
<a class="btn btn-default" href="#" role="button">Link</a>

Open in new window

In fact as the theme is using Bootstrap 3

Did I miss something?
Yes, I don't know about Bootstrap.

I would like to keep the code as close to the original as possible and so far the lemantl has worked although looking at everything. To me this is a strange way of setting up a website as one click this way or another way can throw something else out of whack. I am used to making a back up file in dreamweaver and just going back to that if my new coding doesn't work.

HOWEVER, I actually DID have a space between the word button and  href at first and then it didn't work and now it still seems to work. I just want to make sure that it will continue to work as I have to consider the responsive aspect of this as well - I think.
Yes, It's a pain, the surveys show that the most developers hate it, anyway, WordPress made for the other people who can't or don't want to touch code, not for us.

HAPPY CODING, and hope the part remain to work...
Hi @Wanda

For your info you are seems to use use trada theme which is a Bootstrap theme.
I would contact the theme author to get the documentation.
https://themeforest.net/item/trada-creative-agency-multipurpose-theme/13099614

Also I don't recommend to use Dreamweaver to edit your code as it add unwanted code and space and can break the code...
You better use Notepad++

Good luck
Thank you everyone for your help.