Jump to content

Search the Community

Showing results for tags 'style'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome
    • Announcements & News
    • New Arrivals
  • Web Development
    • Programming
    • Database Development
    • Server Administration
    • Hosting & Domains
    • Frameworks
  • Web Design
    • HTML & CSS
    • Graphics & Multimedia
  • Desktop Discussion
    • Linux Development
    • Windows Development
    • Mac/Apple Development
    • Hardware Discussion
  • Marketing & Business
    • Advertising, Marketing, Monetization & Social Media
    • Search Engine Optimization & Traffic Building
    • Buy, Sell or Trade
  • Prodjex Web Development Applications, Tools and Plugins
    • IP.Board Applications and Plugins
    • Web Tools
  • The Developer Dump
    • General Chat

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests

Found 1 result

  1. I recently needed to style an upload box. I couldn't find any place to do this within the css. Turns out it isn't possible without jquery as far as I could tell. I needed to take the default: I needed it to look like: Got it working with the following: The HTML <div id="file" class="btn">Upload Photo</div> <input type="file" name="file" /> The CSS #file { display:none; } ​ The Javascript From the very intelligent folks at Stack Overflow Variation 1: Image button If you would like to use an image button instead, simple add your image code instead of “Upload Photo” like this: The HTML <div id="file"><img src="/images/button-image.jpg"></div> <input type="file" name="file" /> Variation 2: File name If you would like to use the file name instead of the text “File attached”, you could try the following Javascript, courtesy of the brainy folks of StackOverflow, the only code that is highlighted: The Javascript var wrapper = $('<div/>').css({height:0,width:0,'overflow':'hidden'}); var fileInput = $(':file').wrap(wrapper); fileInput.change(function(){ $this = $(this).val().replace(/C:\\fakepath\\/i, ''); $('#file').text($this); }) $('#file').click(function(){ fileInput.click(); }).show();
×
×
  • Create New...