I've got a blog that formats the titles in an h2 tag, and need to have them aligned left without full justifcation. Trouble is, the entire area that it fits in, a DIV, is set to justify. How can I make the H2's themselves not have the full justification? I tried using h2.classname and text-align:left in the CSS -- but it only works in FireFox. Any suggestions?
i am not quite sure what you mean until i actually look at the code. but have you tried float:left on the h2 tag it sounds like that would fix your problem.
Thanks Tyros -- I've sent you a PM with the site in question. The float:left doesn't accomplish what I'm after, since it puts the first line of text under the headings right up against the H2's.
Well have you tried a span tag where the ID or class of the span has a CSS style with text-align: left; in it?
div { text-align: justify; } h2 { text-align: left; } ========== <div> <h2>generic header</h2> <p>text content</p> </div> Code (markup): cheers, gary
Oh yes, isn't it that the most specifically defined attribute gets the highest priority? I'm just starting to learn CSS for real, and I think I'm actually understanding this
Well I believe that any time you specify a new style, within another, the new style over-rides temporarily. So if I had an entire paragraph that was in italics, due to it being a quote, but then used a style that specifically did not have italics within that paragraph, I'd be turning the italics off.