How to apply gradient to the border of a div?


Tags: css,gradient,border-layout

Problem :

How can I appply gradient to the border of a div using CSS ? Any one example please. I have tried using google, but not able to do it.



Solution :

the trick is to use a wrapper and had an background image to it, so it's IE7+ proof

<span class="buttonWrapper">
   <input type="button" value="Submit" />
</span>

live example on JsBin


    CSS Howto..

    How to make CSS Animation reverse on hover-out?

    How to reuse parts of WordPress site e.g. header, footer, part of header for multiple WordPress sites?

    How fixed a navigation to the center on scroll?

    How to align image next to text and then stack them (responsive)

    How to make header in css but im using opacity?

    css: how to remove pseudo elements (after, before, …)

    How to apply first-child:first-letter to only one section?

    How to fill margin space with divs and give it styles?

    How to ensure three DIV are the same height regardless of content

    how to make nav auto adjsust its menu items using css?

    Before CSS, how one would change margins and paddings?

    how to know when css3 animation ends

    how to style the html contents inside a php include file?

    How do I unset CSS values?

    How do I apply a css padding to one element but not its child

    how to make an image “coming” to foreground

    How to Inject external css style sheet into GWT Panel widget?

    How to CSS style a table such that cells is at most 30% of screen height and use a scroll bar when it's taller?

    HOW TO check if an external (cross-domain) CSS file is loaded using Javascript

    How to hide p1 within div

    Bootstrap: user agent css styles misbehaving how to solve this

    How to force enter key to make a line break inside iframe editor

    How to handle long string where characters stick together

    CSS Syntax - How to interpret this?

    How to vertically center a div for all browsers?

    How do I avoid a fullscreen background image to scale with appearing scroll bars?

    When I try to print a page I created using jQuery Mobile, it always prints an extra blank page. How can I stop this?

    How to detect and deliver separate CSS files for mobile devices?

    How to rotate an element and correctly position it with CSS or jQuery

    Colorbox's overlay not showing