Sent by [EMAIL-REMOVED] on 8 December 2004 20:08
First of all, thanks to the many emails I received about styling tables.
Now, I have a div (divMessage) that can contain error messages (class = ErrorMessage) or
informational messages (class = InformationalMessage). Firefox displays this as desired, but IE (6)
doesn't. IE seems to apply whichever style is listed first.
I have included a test document with the styles inline. I have included two divisions with the same
ID for ease of testing (change the name of either one) -- although Firefox will display both.
If you move ErrorMessage before InformationMessage, then it will display and InformationalMessage
will not.
Any help is greatly appreciated.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/xhtml1-strict.dtd">
<html>
<head>
<title>Test Divisions</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
#divMessage
{
width:85%;
margin:0 auto;
}
#divMessage.InformationalMessage /* Used to display an error message */
{
border:medium double #0000ff;
margin:3px 0px;
padding:3px;
color:#0000ff;
}
#divMessage.ErrorMessage /* Used to display an error message */
{
border:thick solid #990000;
margin:3px 0px;
padding:3px;
color:#990000;
}
</style>
</head>
<body>
<div id="divMessage" class="ErrorMessage">An error message</div>
<div id="divMessage" class="InformationalMessage">An informational message</div>
</body>
</html>
--G
Glenn E. Lanier, II: [EMAIL-REMOVED]
______________________________________________________________________
css-discuss [EMAIL-REMOVED]]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/