Forums

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

Home Forums CSS Apply Background Color only on text Re: Apply Background Color only on text

#92779
angelazou
Participant

This is the full code, I tried various combination of display (including table), but none of it really works.

h1, h2, h3, h4, h5, h6 {
margin: 4px 12px;
padding: 2px 4px;
float: left;
display: block;
clear: both;
line-height: 1.1em;
height: auto;
filter: dropshadow(color=#666, offx=-1, offy=-1);
color: #FFF;
background: #0686C9;
text-shadow: -1px -1px 1px #666;
background: rgb(30,87,153);
background: -moz-linear-gradient(top, rgba(30,87,153,1) 0%, rgba(41,137,216,1) 50%, rgba(32,124,202,1) 51%, rgba(125,185,232,1) 100%); background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(30,87,153,1)), color-stop(50%,rgba(41,137,216,1)), color-stop(51%,rgba(32,124,202,1)), color-stop(100%,rgba(125,185,232,1)));
background: -webkit-linear-gradient(top, rgba(30,87,153,1) 0%,rgba(41,137,216,1) 50%,rgba(32,124,202,1) 51%,rgba(125,185,232,1) 100%);
background: -o-linear-gradient(top, rgba(30,87,153,1) 0%,rgba(41,137,216,1) 50%,rgba(32,124,202,1) 51%,rgba(125,185,232,1) 100%); background: -ms-linear-gradient(top, rgba(30,87,153,1) 0%,rgba(41,137,216,1) 50%,rgba(32,124,202,1) 51%,rgba(125,185,232,1) 100%);
background: linear-gradient(top, rgba(30,87,153,1) 0%,rgba(41,137,216,1) 50%,rgba(32,124,202,1) 51%,rgba(125,185,232,1) 100%);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#1e5799', endColorstr='#7db9e8',GradientType=0 );
-webkit-border-radius: 2px;
-webkit-border-top-right-radius: 8px;
-webkit-border-bottom-left-radius: 8px;
-moz-border-radius: 2px;
-moz-border-radius-topright: 8px;
-moz-border-radius-bottomleft: 8px;
border-radius: 2px;
border-top-right-radius: 8px;
border-bottom-left-radius: 8px;
}

see a screenshot here