In a major key the chords are always I ii iii IV V vi vii(diminished), correct?
Well are all the notes within these chords in the key of the tonic? What I mean is, doesn't the vii chord have notes that aren't in the key signature?
Look again at the post above from Febs. Now it makes more sense to me to do the same thing, except STACK the thirds.
Write out the C major scale -
C D E F G A B C
Then do it again, with the thirds on top, but stay in C major- this gives you intervals of a third (both major and minor)
E F G A B C D E
C D E F G A B C
Add another level of thirds to get the triads- note that we're still ONLY using notes from C major...
G A B C D E F G
E F G A B C D E
C D E F G A B C
And one more time to get the 7th chords...
B C D E F G A C
G A B C D E F G
E F G A B C D E
C D E F G A B C
Now, take elementary basic harmony and analyze those stacks of notes. The first one is C E G B. That's the 1, 3, 5, and 7 of the root (C); it's a major third (C to E) with a minor third on top of it (E to G), and a major third on top of that (G to B); and it's a major triad with a major 7 added. All those are definitions of a major 7. The second stack is D F A C. That's 1, b3, 5, b7 of the root (D), that's a minor third (D to F), with a major 3rd (F to A), and a minor 3 (A to C), and it's a minor triad (D F A) with a minor 7th- three definitions of a minor 7.
To specifically answer your question about the vii chord... The 7th stack is B D F A. All those notes are in the key of C. That's the 1, b3, b5 b7 of the root (B). B to D is a minor 3rd, D to F is a minor 3, F to A is a major 3. And it's a diminished triad (B D F) with a minor 7. That's a minor7 b5 also commonly called a half-diminished chord. If you carry it out to the 7th it's NOT a diminished chord. Why? Because a diminished 7 chord is all minor third so a Bdim would be B D F Ab. THAT one has a note outside the tonic's key (C), but it's not the chord that comes from harmonizing the major scale.
John