Presentation is loading. Please wait.

Presentation is loading. Please wait.

 Pseudo-elements  Centering  Tables  Classes and ids.

Similar presentations


Presentation on theme: " Pseudo-elements  Centering  Tables  Classes and ids."— Presentation transcript:

1

2  Pseudo-elements  Centering  Tables  Classes and ids

3  Characteristics of tags that can have their own attributes  In CSS: tag:pseudo-element  In HTML: not visible  Examples: › a: hover, a:visited › p:first-line, p:first-letter › :before, :after  w3schools w3schools

4  Generally margin-left: auto; margin-right: auto;  Images: need to add display: block;

5  Need to format the parts  Borders  Centering tables vs. text

6  HTML: class=“name”  Names may define format OR content › Either works  CAN apply multiple classes to the same tag  Multiple ways to define › Style that applies to many elements › Style that applies to only one element › Style that only applies in certain contexts

7  HTML: class=“name”  CSS:.name  Particularly useful for color, font info, …

8  Can define it for a specific selector  Useful if you want to group attributes but slightly different  HTML: class=“name”  CSS: tag.name

9  Only applies within context › Avoids putting class= everywhere!  Useful for, › Define tr and td within a table class › Define links only within a list class › Define any formatting within a div  HTML: class=“name” only for encompassing  CSS: tag.name tag


Download ppt " Pseudo-elements  Centering  Tables  Classes and ids."

Similar presentations


Ads by Google