Can CSS a gradient with a pale shade through the middle?

HTML, CSS and anything else that deals with client side capabilities.

Moderator: General Moderators

Post Reply
simonmlewis
DevNet Master
Posts: 4435
Joined: Wed Oct 08, 2008 3:39 pm
Location: United Kingdom
Contact:

Can CSS a gradient with a pale shade through the middle?

Post by simonmlewis »

We want to create a DIV with text in the middle, and a gradient of black and top and bottom, gradient into the middle with a pale shade of grey.

See attached for graphic example.
Graphic example of what I want in CSS.
Graphic example of what I want in CSS.
ss.jpg (5.84 KiB) Viewed 13601 times
Love PHP. Love CSS. Love learning new tricks too.
All the best from the United Kingdom.
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: Can CSS a gradient with a pale shade through the middle?

Post by requinix »

Try a vertical linear-gradient with black at 0%, gray at 50%, and black again at 100%.
simonmlewis
DevNet Master
Posts: 4435
Joined: Wed Oct 08, 2008 3:39 pm
Location: United Kingdom
Contact:

Re: Can CSS a gradient with a pale shade through the middle?

Post by simonmlewis »

Perfect Thanks.
Love PHP. Love CSS. Love learning new tricks too.
All the best from the United Kingdom.
Post Reply