Cuyamaca Collegeskip to content
Apply  & Enroll
Departments
Help for Students
Find People
Online Services
Campus Information
Student Activites
CIS 212: CSS

 


 



 
 

Introduction

The book leaves out a few things, so please be sure you understand the textbook correction below.  I've also listed some differences for 8 and some "nice to know" tips.

Affecting Links with Selectors

CSS tips
TEXTBOOK CORRECTION: link selectors work in a group The book has you alter the a:link and a:hover selectors.  You should also alter the a:visited (link the user has already been to) and a:active ( link that is currently open) -- they work in a group and if you don't to all, styles may not behave properly.
Nice to know: upload css files! If you forget to upload your css file, the css won't work.  This is a pretty common error when new developers create and edit external style sheets.
Nice to know: you can change more than the underline You can change colors and backgrounds as well as turning on and off the underline.  I think it's a bad idea to turn off the underline in body text.  It's fine if there is an obvious grouping of links (such as with a navigation bar), but otherwise, it makes it harder for users to identify links. Here's a nice example of using CSS to create a navigation bar with hover effects: www.maxdesign.com.au/presentation/listamatic/horizontal04.htm.
Nice to know: links can look different (you might want underlined in the body and not in the navigation bar)

The following will change

  • links on the whole page:

    a:link {text-decoration: none;}
    a:hover {text-decoration: underline;}
    a:active {color : #003366}
    a:visited {color : #3366FF}

    You can also show different link styles on different areas of the page.  In this example, text links with class .menu_side will work differently than other text links on the page.

    .menu_side {
       font-family: Arial, Verdana, Helvetica, sans-serif;
       font-size: small;
       font-weight: 500;
    }

.menu_side a,.menu_side a:link,.menu_side a:active,.menu_side a:visited {
   color : #3366FF;
   text-decoration : none;
}

.menu_side a:hover {
   color : #003366;
   text-decoration: underline;
}

CSS Differences for 8

Differences for 8
TEXTBOOK CORRECTION: 8 supports inline CSS

Page 379 says Dreamweaver does not support inline css, but 2004 does.  Keep this in mind during this chapter, 2004 will behave slightly different than the book says.

TEXTBOOK CORRECTION: styles applied differently with 8

Page 390 says to select the text and click .footer in the CSS panel.  In 8, use the property inspector instead (dropdown menu called styles). 

screen shot of drop-down menu

Nice to know: Save CSS files

8 will open .css files when you are changing/creating them so be sure to save and close those also.  If you don't save them, your css will not work. You need to upload them too!

TEXTBOOK CORRECTION: edit styles differently

Page 408 tells you how to edit styles, but this is differnt with 8.  Instead, in the CSS Styles panel, click on the style you want to edit, and click the edit button.

CSS panel


 

 

 

CIS 212 | CIS 213 | GD 217 | ED 214 | Blackboard | Web Development Links


revised July 18, 2008
by Jodi Reed, jodi.reed (at) gcccd.edu
cis2.cuyamaca.net/jreed
Computer & Information Science, Cuyamaca College