Forum Moderators: not2easy
.tag {
padding: 4px;
margin: 3px;
font-size: .9em;
font-weight: bold;
text-transform: uppercase;
color: white;
background-color: darkgreen;
}
trouble is, it makes the darkgreen box the 100% the width of its parent (body). In IE6, just adding width: 0; gives me the desired result, but it fails in Firefox and Opera.
How can I make this cross-compatible?
You can also make the class "float", so it'll take up only the width of its content, or your specified width.