At our February meeting, we took pseudo-class selectors to a new level by employing combined declarations and by using classes.
A combined selector looks like this -- a:hover:visited. It would define the hover style of a link after it has been visited.
So in the below example, the link hover will be overlined when not visited, but underlined after being visited:
a:hover {color:red; text-decoration: overline;}
a:hover:visited {color:red; text-decoration: underline;}
Adding a class to a pseudo-class selector will let you apply the styling to specific links, and that will be useful for defining the style of navigation links. The syntax is familiar:
a:link.nav {color:green;} -- the style declaration
<a href="PACS_Home.htm" class="nav"> PACS HOME</a> -- the link that will now have the text color green
We ended by looking at two proposed tags, <nl> and <nav>, which, if either is adopted, will make it easier to define and style navigation links.
The Philadelphia Area Computer Society CSS Workshop started with the basics of cascading style sheets and will continue as long as there is interest and we have something new to learn.
February 22, 2009
February 16, 2009
February Meeting Announcement
The next meeting of the PACS CSS Workshop will be this Saturday, February 21, at the usual 9 - 10 hour.
We will continue on the subject of styling links, with the goal of developing interesting navigation menus. We worked last month with the pseudo-classes that can be used with the anchor tag, emphasizing the correct order to be used in order for the links to be styled properly.
This month, we will finish off some loose ends relating to that discussion and then get into compound declarations that can give you more power to style links in different ways on the same page.
Along the way, I will show you a couple of HTML tags that I can almost guarantee you have never heard of.
We will continue on the subject of styling links, with the goal of developing interesting navigation menus. We worked last month with the pseudo-classes that can be used with the anchor tag, emphasizing the correct order to be used in order for the links to be styled properly.
This month, we will finish off some loose ends relating to that discussion and then get into compound declarations that can give you more power to style links in different ways on the same page.
Along the way, I will show you a couple of HTML tags that I can almost guarantee you have never heard of.
Subscribe to:
Posts (Atom)