Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Drop Shadow on Form Input Fields?

  • This topic is empty.
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #32681
    grovesk
    Member

    Hi – Can you put drop shadows on the outside of form input fields? I have a project in that includes this in the design. Possible? Not possible? I’ve seen drop shadows in the INSIDE of form fields, but not on the outside. If anyone has any examples, that would be great.

    Thanks, Karen

    #76834
    TheLeggett
    Member

    You might need a different solution depending on what browsers you’re going to support, but the CSS3 box-shadow property is definitely worth taking a look at.

    https://css-tricks.com/snippets/css/css-box-shadow/

    #76559
    grovesk
    Member

    Thanks. I don’t know why I am so surprised the box shadow model works! Now for an IE solution which I am reading about on Robert Nyman’s site Here

    #75397
    grovesk
    Member

    Just an update on this topic for anyone else out there. I also used CSS3 PIE to get the drop shadows and corners on form fields in IE8 and IE7. CSS3 PIE is worth taking a look at for anyone out there trying to do the same thing.
    CSS3 PIE
    Karen

    #75378
    CrownOfMars
    Member

    I’ve been using CSS PIE for a while also, its great. One trick you should look into is not applying CSS PIE to every element, but rather apply a specifc CSS PIE class to the element.

    For example here’s how i achieve what you are looking for:

    .box-shadow-input { -webkit-box-shadow: inset #ddd 1px 1px 2px; -moz-box-shadow: inset #ddd 1px 1px 2px; box-shadow: inset #ddd 1px 1px 2px; behavior: url(/PIE.php); }

    I then use javacript to add the class to all input fields, for example:

    $('input[type="text"], input[type="password"], textarea, select').addClass('box-shadow-input');
    #75343
    Johnny1980
    Member

    Crownofmars thank you for code, helped me well. I always was using form builder, but now I want to do it my own.

    #74413
    grovesk
    Member

    thanks crown of mars. Nice tip.

Viewing 7 posts - 1 through 7 (of 7 total)
  • The forum ‘CSS’ is closed to new topics and replies.