Na początek podam kod html i css:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <link rel="stylesheet" type="text/css" href="style.css" /> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <meta name="MSSmartTagsPreventParsing" content="TRUE" /> <meta http-equiv="expires" content="-1" /> <meta http-equiv= "pragma" content="no-cache" /> <meta name="robots" content="all" /> <meta name="author" content="Owen Briggs" /> <div id="top"> </div> <div id="left"> </div> <div id="leftmiddle"> </div> <div id="middle"> <pre> blablabla </pre> </div> <div id="right"> </div> <div id="rightmiddle"> </div> </body> </html>
body { margin: 0px 0px 0px 0px; padding: 0px 0px 0px 0px; font-family: verdana, arial, helvetica, sans-serif; color: #ccc; background-color: #333; } a { text-decoration: none; font-weight: bold; color: #ccc; outline: none; } a:visited { color: #ccc; } a:active { color: #ccc; } a:hover { color: #ccc; text-decoration: underline; } .ahem { display: none; } strong, b { font-weight: bold; } p { font-size: 12px; line-height: 22px; margin-top: 20px; margin-bottom: 10px; } h1 { font-size: 24px; line-height: 44px; font-weight: bold; margin-top: 0; margin-bottom: 0; } h2 { font-size: 18px; line-height: 40px; font-weight: bold; margin-top: 0; margin-bottom: 0; } h3 { font-size: 16px; line-height: 22px; font-weight: bold; margin-top: 0; margin-bottom: 0; } h4 { font-size: 14px; line-height: 26px; font-weight: bold; margin-top: 0; margin-bottom: 0; } h5 { font-size: 12px; line-height: 22px; font-weight: bold; margin-top: 0; margin-bottom: 0; } h6 { font-size: 10px; line-height: 18px; font-weight: bold; margin-top: 0; margin-bottom: 0; } img { border: 0; } .nowrap { white-space: nowrap; font-size: 10px; font-weight: bold; margin-top: 0; margin-bottom: 0; /* must be combined with nobr in html for ie5win */ } .tiny { font-size: 9px; line-height: 16px; margin-top: 15px; margin-bottom: 5px; } .promocja { font-family: arial; font-color: #ff0000; } #top { margin: 20px 190px 0px 190px; padding: 10px; text-align:center; border: 5px solid #ccc; background: #666; height: 100px; /* ie5win fudge begins */ voice-family: "\"}\""; voice-family:inherit; height: 70px; } html>body #top { height: 70px; /* ie5win fudge ends */ } #left { position: absolute; top: 120px; left: 0px; margin: 190px; padding: 10px; border: 5px solid #ccc; background: #666; width: 120px; /* ie5win fudge begins */ voice-family: "\"}\""; voice-family:inherit; height: 60px; } html>body #left { width: 120px; /* ie5win fudge ends */ height: 60px; } #leftmiddle p { margin-top: 0px; font-family: helvetica; text-align: center; font-color: 666; } #leftmiddle { position: absolute; top: 250px; left: 0px; margin: 190px; padding: 10px; border: 5px solid #ccc; background: #666; width: 120px; /* ie5win fudge begins */ voice-family: "\"}\""; voice-family:inherit; height: 60px; } html>body #leftmiddle { width: 120px; /* ie5win fudge ends */ height: 60px; } #middle { margin: 30px 190px 20px 190px; padding: 10px; border: 5px solid #ccc; text-align:center; } #right { position: absolute; top: 120px; right: 0px; /* Opera5.02 will show a space at right when there is no scroll bar */ margin: 60px; padding: 10px; border: 5px solid #ccc; background: #666; width: 150px; /* ie5win fudge begins */ voice-family: "\"}\""; voice-family:inherit; width: 120px; }height: 80px; html>body #right { width: 120px; /* ie5win fudge ends */ } #right p { margin-top: 0px; font-family: helvetica; text-align: center; } #rightmiddle { position: absolute; top: 220px; right: 0px; /* Opera5.02 will show a space at right when there is no scroll bar */ margin: 60px; padding: 10px; border: 5px solid #ccc; background: #666; width: 150px; /* ie5win fudge begins */ voice-family: "\"}\""; voice-family:inherit; width: 120px; }height: 80px; html>body #right { width: 120px; /* ie5win fudge ends */ } pre { font-size: 12px; line-height: 22px; margin-top: 20px; margin-bottom: 10px; }
No i chodzi o to, żeby zdefiniować kolor czcionki dla <P> zawartego w "Divs"
no i nie chce mi to zadziałać nawet jak zamiast class="promocja" daje bezpośrednio style="font-color: #FF0000;" ,
nie mówiąc już o rozwiązaniu w stylu #right p
Dlaczego tak się dzieje?
Czyżby nastepowało tu jakieś dziedziczenie atrybutów z body ?