dhamo dharan
dhamo dharan

Reputation: 138

How to use bootstrap in laravel mail template

I am tried more then 20 times to getting button with href using bootstrap in mail tamplate but it not give right output.

<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
  <script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>

<a href="http://google.com" class="btn btn-success">Yes</a> 

Upvotes: 6

Views: 8670

Answers (2)

M Zishan
M Zishan

Reputation: 41

Unfortunately, it appears that Gmail does not support link or style tags ANYWHERE in the HTML. This is getting seriously annoying

Upvotes: 4

Dees Oomens
Dees Oomens

Reputation: 5082

You can't use the link tag in most of the emails. Because not many email clients support this, best to just forget it. I guess you need to put the CSS in there raw. Example:

<style>
    // All the bootstrap css
</style>

But I recommend (if you want to do it your own way) to style your own button, this way there will be less data in your email template.

<button type="button" style="background-color: red;">My button</button>

EDIT

Best to use an email css/framework template, check this question

Upvotes: 2

Related Questions