tags:

views:

158

answers:

4
+2  A: 
Martin
It should inherit it. When I view computed styles in Firebug too, they are the exact same (in `<code>` and `<div class="line-numbers">`)
alex
I know it "should", but did you try it?
Martin
@Martin - No, I haven't tried it. Will test soon. If it works, I'll accept your answer. +1 for coming back and making an update :) Thank you
alex
I placed your CSS in, and while *some* of them line up, they don't all do! Quite frustrating!
alex
I agree with Martin, it's definitely a matter of line-height, but also different font-size can affect how everything lines-up. I'd do smt in the fashion of `div.container > div, div.container > code { line-height: 1.5em; font-size: 12px; }`
kRON
+1  A: 

Where do you use ".code .caption" in your HTML?

Martin
I don't in this example - but in other ones I provide a caption - before the closing `</div>` I have `<span class="caption">caption</span>`
alex
+1  A: 

your calling a class ".code" in your css, but code is a tag not a class, so it'd be just "code" in your css

Wayne Austin
I have both - the main div's class is code, and I have a code element nested within this.
alex
he's targeting the `div.code.php` with `.code`
kRON
A: 

You have a space in your class: "code php"

[edit: no coffee]

Remove complexity. What is in your code class definition? In your php class definition? If php comes comes second and you're changing code, your changes won't show. Side note: use something more descriptive than code, since code is an element name. I'm pretty sure it doesn't matter, but it helps readability and prevents simple errors like the difference between code and .code not to mention #code.

Elizabeth Buckwalter
That's valid. I have 2 classes.
alex
That's just multiple class names: http://www.w3.org/TR/html401/struct/global.html#adef-class
NickFitz
So this answer sucks. Sorry guys.
Elizabeth Buckwalter