CSS font colour???
CSS font colour???
Out of context: Reply #3
- Started
- Last post
- 5 Responses
- dc_again0
it has nothing to do with margins, or padding or anything else.
a h tag (h1, h2, h3, etc) is a block element, meaning it sits on its own line. a div tag is a block element, also meaning that it sits on it's own line.
put them both together (a div inside a h) and they're are unable to share the same line, and so one breaks onto the next.
if you want to insist on using a div rather than span for this, make div.green display inline rather than block.