CodeIgniter Forums
styling upload form inputs - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: styling upload form inputs (/showthread.php?tid=13528)



styling upload form inputs - El Forum - 11-25-2008

[eluser]Fenix[/eluser]
Before I spend more time researching this, can anybody share an easy way to style upload form inputs?


styling upload form inputs - El Forum - 11-26-2008

[eluser]Greg Aker[/eluser]
what about adding an id or class to the form element you want to style? Something like:

Code:
<style type="text/css">

input#file {font-weight:bold; font-size:22px;}

</style>

<?php echo $error;?>

<?php echo form_open_multipart('upload/do_upload');?>

<input id="file" type="file" name="userfile" size="20" />

<br /><br />

&lt;input type="submit" value="upload" /&gt;

&lt;/form&gt;

-greg


styling upload form inputs - El Forum - 11-26-2008

[eluser]xwero[/eluser]
Styling an file input wasn't easy and is has become more difficult because the webkit-based browsers don't have the inputfield-button but a button-label layout.

PPK has a way he got from one of it's readers. Basically you hide the input itself and add fake input that triggers the actual input field. All this is best done in javascript.