By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,766 Members | 1,261 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,766 IT Pros & Developers. It's quick & easy.

Problem assigning style to the h2 tag in this block:

P: n/a
For some reason the text in h2 tag is displaying as white in IE. Any
suggestions?

http://www.salperalta.com/

<td class="sidebar" id="sidebar-right">
<div class="block block-listing" id="block-listing-0">
<h2>Easy MLS Search for Oregon and Southwest Washington:</h2>
<div class="content">
</div>
</div>
</td>

..sidebar .block h2 {
padding: 3px 0 0 0;
margin: 0;
margin-left: 3px;
font-size: 12px;
color: black;
}

h2 { font-size: 15px; color: black;}
..sidebar .block block-listing h2 {
padding: 3px 0 0 0;
margin: 0;
margin-left: 3px;
font-size: 12px;
color: black;
}

h2 { font-size: 15px; color: black;}
body {
color: #000000;
background: #ffffff;
font-family: Verdana, Helvetica, Arial, Lucida, sans-serif;
padding: 0;
margin: 0;
}

Jan 29 '07 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Scripsit sp******@progressivetrail.org:
For some reason the text in h2 tag is displaying as white in IE. Any
suggestions?

http://www.salperalta.com/
The h2 text is indeed in white (but it's there, as one can see by selecting
it with the mouse) - on IE 6. On IE 7, it's black. This is odd, since all
declarations that set color for h2 in any context seem to set it black. But
I didn't check for declarations involving the universal selector *.

The page is fairly complex, with three external stylesheets and several
external JavaScript files (though disabling JavaScript on IE 6 does not seem
to affect the problem).

Finding out the source of the problem might thus be difficult to find. But
shouldn't you start from validating the markup, then proceed to using a
checker on the CSS code? There seems to be a considerable number of markup
errors. You should also make a choice between HTML 4.01 and XHTML instead of
mixing the two in the same document. (The expert advice is to use HTML 4.01,
but you can of course use technobabble-XHTML _if_ you are careful enough to
follow guidelines that effectively make it HTML 4.01 with pointless
kludges.)

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/

Jan 29 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.