13. Future of HTML and CSS
Activity 13.01: Button Library
Solution
- After creating the
Activity 13.01.html
file with the markup, the first task is to add styles for the primary button. We do this by adding a class selector (.button--primary
) to our style rules and adding the appropriate styles (background and text color) for the default and hover states (with a:hover
pseudo-class):Â Â Â Â Â Â Â Â Â Â Â Â .button--primary { Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â background: #f44336; Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â color: white; Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â font-weight: bold; Â Â Â Â Â Â Â Â Â Â Â Â } Â Â Â Â Â Â Â Â Â Â Â Â .button--primary:hover...