Im a newbie in html/css, I'm working on something for school. I did different things with DIV id, and then a # in my external css sheet and it all worked, i created a nice lay out. Now i want some parts of the text in italics, red and other in regular. I thought of wrapping the parts that needed to be italic with div. But this time it doesnt seem to work. Does someone know what i'm doing wrong? The other DIVS do work:
IMPORTANT NOTE: All the CSS has to be in a external CSS sheet. I dont know why but its mandatory in school. So I cant do DIV style=". It had to be with the #
HTML:
<div id="navigation">
<nav>
<ul>
<li><a href="index.html">Home</a></li>
<li><a href="nieuwsartikel.html">Nieuwsartikel</a></li>
<li><a href="sfeerverslag.html">Sfeerverslag</a></li>
<li><a href="column.html">Column</a></li>
</ul>
</nav>
</div>
<div id="content">
<article>
<h1>
De Groot spreekt over informatieoorlog
</h1>
<div id="italic">
Aan de bar van het duistere bestofte cafeetje in Amsterdam zit ze, Naomi de Groot. Bijna onherkenbaar, vermomd door middel van een paarse pruik en een enorme zonnebril. Nederlands meest bekende complottheoriste kijkt wantrouwend naar haar bestelde glas cola, ze schuift het aan de kant en pakt uit haar tasje een fles met zelf gefilterd water. ‘je kan niet voorzichtig genoeg zijn’ fluistert ze. Ik kan niet wachten om haar te interviewen over haar gedachtes en visies met betrekking tot internet privacy.
</div>
My CSS:
#content h2
{
color:#000;
font-size: 160%;
margin: 0 0 .5em;
}
body
{
background-image: url(http://cdn.elegantthemes.com/blog/wp-content/uploads/2013/09/bg-1-full.jpg); }
}
#italic
{
font-style:italic;
color:red;
}
#footer
{
background:#ccc;
text-align: right;
padding: 20px;
height: 1%;
}