Link to home
Start Free TrialLog in
Avatar of jagguy
jagguyFlag for Australia

asked on

blue border and header

Hi,

In CSS, I forget how to make a border around a div with a box  header that has a  gradient color blue.
If the browser cant handle the gradient color then I need it to still display a color.
Can someone give me an example please.
Avatar of Gary
Gary
Flag of Ireland image

Not sure what you mean exactly
Something like this?
http://jsfiddle.net/GaryC123/7k00kg3d/
ASKER CERTIFIED SOLUTION
Avatar of Gary
Gary
Flag of Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jagguy

ASKER

Yes the last one, with a heading in it

What happens if it cant display the gradient for older browsers?
Avatar of jagguy

ASKER

Also the div have class names ? as I need to reproduce it
If you are just worried about IE8 then add to the css

filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='blue', endColorstr='lightblue', GradientType=0 );

Open in new window

You shouldn't need to worry about the other browsers as they tend to self update to the latest version anyway which all support CSS3
Then just add your class names and use them in the css instead of div
If you need a fallback for browser that don't support gradients just put background:blue; ahead of the gradient declarations and the browsers that can't do gradients will use the blue because they ignore the linear-gradient that they don't understand.

Cd&
just add another line inside css like this:

background-color:blue;