+ 1

Button Link HTML CSS

How do I make my button active. Below is what I have coded, but the border does not display on life view and the button is not clickable. <button type="button" onclick="location.href='https://www.oroa.com/blogs/news';" style="background-color: white; border: 2px solid #314893; color: #314893; padding: 12px 16px; font-size: 14px; font-family: times new roman, times, serif;">GET INSPIRED</button>

8th Aug 2017, 6:20 PM
Lanie
Lanie - avatar
8 odpowiedzi
+ 2
put the button inside an <a> <a href="yourlink.net"> <button>my btn</button> </a>
8th Aug 2017, 6:30 PM
voidneo
+ 5
What do you mean by << life view >>? @@ You <button> code is well working (except if JS not available or desactivated by user ^^), and itself borders are displayed... in html document context, of course ;P
9th Aug 2017, 7:03 AM
visph
visph - avatar
+ 5
Emails with Html code are very limited compared to browsers view ^^ Check this link about that, on mailchimp site: http://kb.mailchimp.com/campaigns/design/limitations-of-html-email
9th Aug 2017, 3:42 PM
visph
visph - avatar
+ 3
Thank you! It's clickable now, but the border still does not show. It's underlined instead. I guess I have to use some css to style it...
8th Aug 2017, 6:39 PM
Lanie
Lanie - avatar
+ 3
Yes, you'll have to style the button and the a tag: a { text-decoration: none; }
8th Aug 2017, 6:42 PM
voidneo
+ 2
The button is now functional and looks as I desired. It's really a basic link with border, instead of a button. I ended up not using <button> after all. I used the code below. THANK YOU ALL FOR YOUR HELP! <a href="https://www.oroa.com/blogs/news" style="text-decoration: none; border: 2px solid #314893; color: #314893; padding: 12px 16px; font-size: 16px; font-family: times new roman, times, serif;">GET INSPIRED</a>
9th Aug 2017, 4:43 PM
Lanie
Lanie - avatar
+ 1
I'm creating a newsletter in MailChimp. In the MailChimp visual I see the border, but when I sent a test email, there's no border. That's what I was trying to say by live view.
9th Aug 2017, 3:58 PM
Lanie
Lanie - avatar
0
https://t.me/Coders_Crafters join our Teligram group for discussion about HTML 5 & CSS codes questions and many more
13th Oct 2023, 4:06 AM
Alison Pinto
Alison Pinto - avatar