Login | Register | FAQ
Anonymous

Question about CSS Class.

+ Post a reply

2 posts Page 1 of 1


Question about CSS Class.

by Alice Egypt » Sun Sep 25, 2011 8:30 am

In the example here in the CSS tutorial
I can't understand,where should I put the class to change the color of the links?
the Example is like that
<p>Grapes for white wine:</p>
<ul>
<li><a href="ri.htm" class="whitewine">Riesling</a></li>
<li><a href="ch.htm" class="whitewine">Chardonnay</a></li>
<li><a href="pb.htm" class="whitewine">Pinot Blanc</a></li>
</ul>

<p>Grapes for red wine:</p>
<ul>
<li><a href="cs.htm" class="redwine">Cabernet Sauvignon</a></li>
<li><a href="me.htm" class="redwine">Merlot</a></li>
<li><a href="pn.htm" class="redwine">Pinot Noir</a></li>
</ul>

then You said that we will add
a {
color: blue;
}

a.whitewine {
color: #FFBB00;
}

a.redwine {
color: #800000;
}

where should we add them in the above example?
User avatar

Alice Egypt

  • Posts: 4
  • Joined: Sun Sep 18, 2011 5:51 am

Re: Question about CSS Class.

by HTML.net » Sun Sep 25, 2011 1:10 pm

Hi Alice

There are three ways you can apply CSS to an HTML document. These methods are all outlined in lesson 2: http://html.net/tutorials/css/lesson2.php

I hope it helps.

- Andreas, HTML.net
User avatar

HTML.net
Site Admin

  • Posts: 1186
  • Joined: Sat Sep 11, 2010 11:24 am
--
Show some love for HTML.net on Twitter, Facebook and Google: Use the buttons on top of all pages.


+ Post a reply

Page 1 of 1