ID selectors


show more ID selectors provides you with in-depth training on Web. Taught by Garrick Chow as part of the Dreamweaver CS3 Essential Training show less
please wait ...

ID selectors

There will probably come a time when you want to style one specific element on a group of pages, such as a navigation bar, or a background color, or a logo, or even a footer that's displayed on every page of the site. This one element should be treated differently than anything else on your site. Now after you learn about class selectors, your immediate solution might be to create a class selector, and apply that class to the footer inside each page. But a more elegant and semantically correct approach is to give the element a unique ID, and then style just that specific element. The more specific you are with your rules, the less likely you are to have issues with something getting incorrectly styled. Now, in this particular example, this is what would show up in your actual style sheet.

Now the pound symbol identifies the selector as an ID selector. The text following the pound symbol is the ID of the elements. So the ID in this case is #divCopyright. That's the name of the ID....

ID selectors
Video duration: 10m 21s 10h 21m Beginner

Viewers:

ID selectors provides you with in-depth training on Web. Taught by Garrick Chow as part of the Dreamweaver CS3 Essential Training

Subject:
Web
Software:
Dreamweaver
Author:
please wait ...