SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Enthusiast
    Join Date
    May 2006
    Posts
    27
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    File Input borders

    I have a upload site, were it has a input border for the input field, I tried to add a border: 0; border: none; border: 1px solid #fff;border="0"

    None of these work! Is there any way to change the border of a input field?

    Note this is a:
    HTML Code:
    <input type="file" id="image" size="55" name="image" lang="en" style="border: 0px;" />
    I have added classes after class to try to get the border out! No luck, if theres any CSS or html that will stop this please post!

  2. #2
    He's No Good To Me Dead silver trophybronze trophy stymiee's Avatar
    Join Date
    Feb 2003
    Location
    Slave I
    Posts
    23,424
    Mentioned
    2 Post(s)
    Tagged
    1 Thread(s)
    That form field is notorious for being difficult to style. Most browsers limit the amount of styling you can do or offer no styling at all. I'm afraid you're pretty much stuck.

  3. #3
    Carpe Diem = Fish of the Day fisherboy's Avatar
    Join Date
    Dec 2005
    Location
    New Zealand
    Posts
    488
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The best result I can get is adding this

    <style type="text/css">
    <!--
    form {border: none;}
    #image {border: 1px solid #fff}
    -->
    </style>

    to the head section. Reduces the border to shadow top and left in FF and shows nothing in IE. I have no idea why!

    Just using form {border: none;} reduces it to 1px light grey.

    As stymiee says, very hard.
    fisherboy
    Web Site Design

  4. #4
    SitePoint Enthusiast
    Join Date
    May 2006
    Posts
    27
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by stymiee
    That form field is notorious for being difficult to style. Most browsers limit the amount of styling you can do or offer no styling at all. I'm afraid you're pretty much stuck.
    Is there a way to make your own?
    Were say maybe you hit a button, and it starts the browsing, then when a user selects a image or file, it puts it in a span, and the php reads it from the span?

    FisherBoy, I tried that but didn't work.

  5. #5
    He's No Good To Me Dead silver trophybronze trophy stymiee's Avatar
    Join Date
    Feb 2003
    Location
    Slave I
    Posts
    23,424
    Mentioned
    2 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by GarrettB
    Is there a way to make your own?
    Were say maybe you hit a button, and it starts the browsing, then when a user selects a image or file, it puts it in a span, and the php reads it from the span?

    FisherBoy, I tried that but didn't work.
    Not that I know of. I think the browsers did this for security reasons so users can't be tricked into uploading sensitive files.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •