css - Why doesn't the list set to italic in div -


i wondering if tell me why doesn't list set italic class in div?

<style type="text/css"> body{ font:62.5% arial, helvetica, sans-serif; } h1{ font:small-caps 1.6em "times new roman", times, serif; } .recipe .intro{ font:italic 1em arial, helvetica, sans-serif; } </style> </head>  <body> <h1>recipes cheese</h1>  <p class="intro">cheese remarkably versatile food, available in literally hundreds of         varieties different flavors , textures.</p>  <div class="recipe">  <h2>welsh rarebit</h2>  <p class="intro">cheese remarkably versatile food, availalbe in literally hundreds of varieties different flavors , textures.</p>  <ol> <li>lightly toast bread</li> <li>place on baking tray, , spread butter.</li> <li>add grated cheddar cheese , 2 tablespoons of beer saucepan. place saucepan on medium heat, , stir cheese continuously until has melted. add teaspoon of wholegrain mustard , grind in little pepper. keep stirring.</li> <li>when thick , smooth, pour on each piece of taost spreading edges stop toast burning.</li> <li>place under grill couple of minutes or until golden brown.</li> </ol> </div>     </body> 

isn't order list should italic since it's in class recipe. please explain why isn't.

thanks

<li> doesnt inherit properties of css class .recipe, in order apply have following:

.recipe li{     font:italic 1em arial, helvetica, sans-serif; } 

same happens tag <a>, have apply value need in .css

you can check demo

if wanna more info, check documentation


Comments

Popular posts from this blog

jquery - Invalid Assignment Left-Hand Side -

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -