tags:

views:

44

answers:

2

Why font-family and font size not working of this css code?

        .content_box { float:left; margin-left:41px; width:265px; font:Arial, Helvetica, sans-serif; }
        .content_box h2 { color:#585858;  font:bold 25px; margin-bottom:20px; }
        .content_box p { color:#4F4F4F; font:12px/1.8em; margin-top:18px; }
        .content_box > a { background:url("../images/readmore.jpg") no-repeat top left; 
         color:#6C6C6C; display:block; font:12px "Times New Roman", Times, serif;  
         height:29px; margin-top:15px; padding-top:7px; text-align:center;
     text-decoration:none; text-transform:uppercase; width:100px;
                                        }
        .content_box ul { margin-left:15px;margin-top:3px; list-style:disc inside none;}
        .content_box li { border-bottom:1px dotted; list-style-image:url("../images/arow.jpg"); 
margin-bottom:7px;  }
        .content_box li a { color:#0F4DB6; font:12px; text-decoration:none; }
+3  A: 

The minimum font specification has to be

font: 16px Arial

that is, size with a font name.

Usually, it is also good to put in a generic name:

font: 16px Arial, sans-serif

to change individual property, you will need font-size and font-family specifically.

動靜能量
He probably meant to use `font-family`?
Paul Tomblin
+4  A: 

You are using font, when you are using just font the size and family are both required. You can separate those using font-family and font-size.

Dustin Laine