You can't do it just for the border. You need to define the width: and/or height: attribute in the CSS for the h3, and the border will adapt around that. BTW... never use multiple tags for the same element, combine them in one (this includes example of adding width and height to it...
border: 2px dashed #cccccc;
Though i'm a bit rusty on CSS... perhaps I am wrong and h3 tags don't support width and height (like those retched span tags!... you gotta love em, but they lack support for a lot of CSS features)