Question : css inheritance

Hello,

I have an issue with the css of an element.

I would like the element to have the font type Comic Sans MS, but it seems to have the font type Times New Roman.

The element can be seen at the page

http://aupresent.thalasoft.com/newspaper/6

The element is the link:

"La mise sur le marché de dosettes de café Casino compatibles avec les cafetières Nespresso en mai prochain s’apprête à briser le monopole de la filiale de Nestlé..."

Why is it inheriting from the following ?

p.MsoNormal, li.MsoNormal, div.MsoNormal

How can I force the inheriting from the following ?

37.css (line 128)
Inherited fromdiv.newspaper
.ID_M_37_P_20908 .newspaper {
font-family:'Comic Sans MS',Verdana;
}

Here is what the Firebug has to say of the css of the element:

(Note that you would have to view it in Firebug, as lots of the following css properties have a strike indicating their are not applied)

element.style {
color:#000000;
}
img, div, span, input {
}
default.css (line 33)
Inherited fromp.MsoNormal
element.style {
text-align:justify;
}
p.MsoNormal, li.MsoNormal, div.MsoNormal {
font-family:"Times New Roman";
font-size:12pt;
}
6 (line 340)
p.MsoNormal, li.MsoNormal, div.MsoNormal {
font-family:"Times New Roman";
font-size:12pt;
}
6 (line 239)
Inherited froma display.ph...StoryId=11
.ID_M_37_P_20908 .newspaper_excerpt a {
color:#666699;
font-size:14px;
font-weight:normal;
}
37.css (line 128)
.ID_M_37_P_20908 .newspaper a {
font-family:'Comic Sans MS',Verdana;
}
37.css (line 120)
.ID_M_37_P_20909 a {
font-family:'Comic Sans MS',Verdana;
font-size:15px;
font-weight:normal;
}
37.css (line 4)
.ID_M_37_P_20908 a {
color:#000000;
font-family:'Comic Sans MS',Verdana;
font-size:15px;
font-style:normal;
font-weight:bold;
}
37.css (line 3)
Inherited fromdiv.newspaper_excerpt
.ID_M_37_P_20908 .newspaper_excerpt {
color:#666699;
font-size:14px;
font-weight:normal;
text-align:left;
}
37.css (line 128)
Inherited fromdiv.newspaper
.ID_M_37_P_20908 .newspaper {
font-family:'Comic Sans MS',Verdana;
}
37.css (line 120)
Inherited fromtable.ID_M_37_P_20909
element.style {
text-align:center;
}
.ID_M_37_P_20909 {
font-family:'Comic Sans MS',Verdana;
font-size:15px;
font-weight:normal;
}
37.css (line 4)
Inherited fromdiv
element.style {
text-align:center;
}
Inherited frombody.ID_M_37_P_20908
.ID_M_37_P_20908 {
color:#000000;
font-family:'Comic Sans MS',Verdana;
font-size:15px;
font-style:normal;
font-weight:bold;
text-align:center;
}

Answer : css inheritance

The problem is that the text is inside a <p> which is inside the <a>. So the font-family style for the <p> is being used instead of that of the <a>. <p>s are not allowed inside <a> elements.

The W3C Markup Validator is great for finding problems like this: http://validator.w3.org/

P.S. Is there a particular reason why you are using an MS Office app to generate part of your page?
Random Solutions  
 
programming4us programming4us