css - How to make the bootstrap button,when clicked to redirect to a specific page -


here code have

<div class="btn btn-default btn-lg btn-block for-get-button">   <%= link_to "get box for", download_picture_path(@gig), :target => "_blank" %> <%= @gig.pointsneeded %> points </div> 

to clarify first code above,redirects user need.

<%= link_to "get box for", download_picture_path(@gig), :target => "_blank" %>  

the second code,just shows number of points required

<%= @gig.pointsneeded %> 

and word "points" word comes after code.

and css code:

.btn.btn-default.btn-lg.btn-block.for-get-button {   background-color: #000000;   text-color: #00ffff;   a:link {      color: #00ffff;   }   a:visited {      color: #00ffff;   }   a:hover {      color: #00ffff;   }   a:active {      color: #00ffff;   }   color: #00ffff; } 

question: how make whole code when clicked on part/side of button formed around it,when clicked should redirect download_picture_path(@gig).because now,on hover on "get box for" underline appears,and have click on "get box for" redirected need,when should able click anywhere in button redirected.

hope made myself clear.

this should work you:

<%= link_to "get box #{@gig.pointsneeded} points", download_picture_path(@gig), :target => "_blank", class: "btn btn-default btn-lg btn-block for-get-button" %> 

although code might not on styling since took out div , placed on link_to. should solve problem


Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -