• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
adding font awesome image to form_submit

#1
Hi there,

I am just trying to add the fa-search image to the following button but I just cannot figure out how.

PHP Code:
<?php echo form_submit(array('id' => 'submit''value' => 'Search''class' => 'btn btn-default')); ?>


Does anyone have any ideas please?

Thanks,
Doomie
Reply

#2
I would do so:

Code:
<button type="submit" id="submit" class="btn btn-default">
  <span class="fa fa-search"></span> Search
</button>

attachment result image


.png   Sin título.png (Size: 1.24 KB / Downloads: 207)
Reply

#3
Code:
<?php echo form_button(array('name' => 'form_submit', 'type' => 'submit', 'class' => 'btn btn-default', 'content' => '<i class="fa fa-search fa-fw"></i> Search')); ?>
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.