Colour not working on an H2 Tag?

They have: 82 posts

Joined: Jun 2002

How do all?

I've used Dreamweaver 4 to redefine the H2 Tag throughout my Webpages and all looks hunkey dorey on both Dreaweaver itself and when I check the code. But when I preview in a browser it displays as if no colour has been specified for the H2 tag (it previews in black when I've clearly set the colour as blue (I've even double checked my style sheet and it's set as blue?)

The H1 and H3 tags (also redefined) all preview as they should but not the H2?

Any advice much appreciated.

Regards

Andrew

Busy's picture

He has: 6,151 posts

Joined: May 2001

is the tag closed?
can you post the h2 section from your style sheet and code where your h2 tag is on the site please

dk01's picture

He has: 516 posts

Joined: Mar 2002

Yeah sounds like an unclosed tag to me.
-dk

They have: 82 posts

Joined: Jun 2002

Cheers for the replies DK and Busy.

As soon as you mentioned unclosed tags I checked it myself and I'm embarrassed to say I had left out a bracket. "Whoops!" On inserting it the Style sheet now works okay. Cheers

Can I ask as a related add on please?
Is there a way of defining line spacing with the H2 tag?
I want my body text to follow on the immediate line below my H2 tag but DW (or perhaps the browser?)

The H2 part of my Stylesheet reads:-

h2 {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; font-weight: bold; color: #003366}

an example of my HTML:-

I have just moved into a new property and have no bin. How do I obtain one?
The RCA collects rates on behalf of the City and Borough/District Councils but is not responsible for rate funded services.

However this seems to insert a blank line between the question and the answer and I would like to remove this.

Cheers

Andrew

Busy's picture

He has: 6,151 posts

Joined: May 2001

I believe you can do this with CSS but isnt fully supported in older browsers. don't think its done with font, rather padding or border properties.
You could use a tag instead with font properties for it big and bold instead of the heading tag.

They have: 238 posts

Joined: May 2002

You could simply take out the tag and you'd be good to go. Wink

Suzanne's picture

She has: 5,507 posts

Joined: Feb 2000

You can (negative margin value) but it's not well supported -- it seems to be different in different browsers, and can cause some overlapping of the heading and the paragraph.

DO NOT JUST REMOVE THE PARAGRAPH!

This will defeat the purpose of proper markup giving structure to the document and the information.

I would strongly recommend that you accept the whitespace as a good thing that helps the reader find headings and skim the document to find the relevant information.

They have: 82 posts

Joined: Jun 2002

Many thanks one and all
Regards
Andrew

dk01's picture

He has: 516 posts

Joined: Mar 2002

Replace with and it should change it also.
-dk

They have: 82 posts

Joined: Jun 2002

Cheers dk01

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.