Forum Moderators: not2easy
html code:
<div id="mainmenu"><img src="images/mainmenu.gif" align="left" border="0" />
<ul><li><a href="index.html" target="_self"><em>Home</em></a></li><li><a
href="javascript:openWin('fundcondition.html')">Fund's Update</a></li><li><a
href="advertisement.html" target="_self">Help! MyTSP Grow</a></li><li><a
href="mytspnews.html" target="_self">MyTSP News</a></li><li><a
href="construction.html" target="_self">MyTSP Articles</a></li></ul>
</div>
CSS code:
#mainmenu ul, #precepts ul {
padding: 0px;
margin: 0px;
text-align: left;
margin-top: 40px;
}
#mainmenu ul li, #precepts ul li {
list-style-type: none;
text-align: left;
margin: 0px;
padding: 0px;
}
#mainmenu ul li a:link, #precepts ul li a:link {
color: #000000;
font-size: 14px;
text-decoration: none;
padding-top: 3px;
padding-bottom: 4px;
display: block;
font-weight: bold;
padding-left: 20px;
background: #006600;
border-bottom-color: #003333;
border-bottom-style: solid;
border-bottom-width: 1px;
}
#mainmenu ul li a:hover, #precepts ul li a:hover {
color: #000000;
font-size: 16px;
text-decoration: none;
font-weight: bold;
}
#mainmenu a:visited, #precepts a:visited {
text-decoration: none;
font-style: italic;
padding-top: 3px;
padding-bottom: 4px;
padding-left: 20px;
display: block;
color: #000000;
border-bottom-color: #003333;
border-bottom-style: solid;
border-bottom-width: 1px;
}
It doesn't validate for IE 5.0
Not sure what this means. HTML code validates to a DOCTYPE, not a browser. CSS code validates to a version, not a browser.
Technically, setting the LI to display:inline and the anchor to display:block is illegal, since it results in a block level anchor nested in an inline list item. It doesn't throw an error, however, since it happens in the CSS. The validator only throws an error for this kind of nesting if the HTML elements in question have default display values that are illegal. In other words, nesting a paragraph in an anchor gives a validator error since <p> defaults to block and <a> defaults to inline. But since the defaults for <li> and <a> do not result in an invalid nesting, the needed CSS values to fix the whitespace bug should not throw validator errors, at all.
If you're really concerned about it, stick the display:inline in an IE specific stylesheet so only IE gets it.
cEM
It's a CSS validation that found the error. I'm no browser code guru but it's probably IE didn’t include this property in the Mac and Win IE 5.0 browser, or they used the property for something else.
What are you rambling about? It’s nothing to worry about, what percentage of browser’s out there are still IE 5.0? If need be I’ll have a script redirect that version to a table layout.
What are you rambling about?
That's nice.
What I am rambling about is code validation. When you run CSS or HTML code through the W3 validators, they check the content of the code against the rules specified in the DOCTYPE used on the page (in the case of HTML validation), or the rules specified by the latest accepted CSS version (in the case of CSS validation).
I've never seen, nor used, a validator that compares the code against a specific browser. Apparently they exist, although I don't see what the point would be in using one.
FYI, display:inline is fully supported in IE5.
If you would care to further discuss this validation error you received, perhaps some more details would be in order (although the insults are fun, too).
cEM
Here, your an intelligent human being help me with this:
[webmasterworld.com...]
If the area is swelled with text great the div shift's right, if not the div center's.
His response was accurate for the context of your query. The correct format of your question would've been:
"The CSS validator says it won't work in IE 5.0".
You'll have to understand that most of us who respond are used to looking at code, which is context sensitive. When we respond to a post, it's in context to what's been posted.
You have to be careful when asking questions to make sure that your comments express exactly what you're trying to say.
Good luck. :)
Again, I apologies for my frustration!