CSS Gradient border

LVL 22
Russ SuterSenior Software DeveloperAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Just use border-image:


Didn't put any of the prefixes in, just the main one.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Russ SuterSenior Software DeveloperAuthor Commented:
Perfect and much simpler than the example. Thank you!
Just to clarify on that, I didn't "bother" putting in the prefixes just for the example, but if you want to maintain compatibility, you still should.

Though it's getting less and less necessary as time goes.
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

Russ SuterSenior Software DeveloperAuthor Commented:
Thanks for that. Honestly I'm not even sure what the prefixes do. I've been a web application developer for years but I got a little behind on CSS and HTML5. I'm playing catch up. Know any good primer resources where I can find out what the prefixes are all about?
They're basically just for pre-release.
Mainly CSS 3 things, when it's not implemented (or fully adopted), the browser manufacturers start implementing but with their own prefixes.

So -webkit-lineargradient is basically Chrome's version before it was fully adopted.  Don't recall how many versions back that would have been.

But for most of the items, most browsers have adopted the full standard now, and you don't need any of the prefixes (since most users auto-update).
Russ SuterSenior Software DeveloperAuthor Commented:
Nice to know. Thanks.

I still have no idea what the :before and :after pseudo classes do though. More research...
You might want to try developer.mozilla.org.

Though personally I think FF is quickly becoming the IE6 of the modern age, the developer site has very good and in-depth descriptions and examples of new elements.


::before and ::after are SO incredibly handy, and let you do so many things with the interface without throwing in tonnes of extraneous markup.  The main think to keep in mind, is that they insert content INSIDE the target tag.  So div::before will insert content before the markup content within the div, not actually before the div itself.

So if browsers abide properly, you can't (shouldn't) use them on things like input elements, that can not have children.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.