The box-shadow property applies one or more shadows to an element. The box-shadow property takes values for offset-x (how far…
Category: freeCodeCamp
Create Visual Balance Using the text-align Property
Text is often a large part of web content. CSS has several options for how…
Override Styles in Subsequent CSS – freeCodeCamp Solutions
Create an additional CSS class called blue-text that gives an element the color blue. Make sure it’s…
Use Attribute Selectors to Style Elements – freeCodeCamp
For this challenge, you will use the [attr=value] attribute selector to style the checkboxes in CatPhotoApp. This…
Set the id of an Element – freeCodeCamp Solutions
In addition to classes, each HTML element can also have an id attribute. Give your form element the id cat-photo-form….
Give a Background Color to a div Element – freeCodeCamp Solutions
Create a class called silver-background with the background-color of silver. Assign this class to your div element. <link href=”https://fonts.googleapis.com/css?family=Lobster” rel=”stylesheet” type=”text/css”> <style>…
Add Borders Around Your Elements – freeCodeCamp
Create a class called thick-green-border. This class should add a 10px, solid, green border around an…
Specify How Fonts Should Degrade – freeCodeCamp Solutions
To begin, apply the monospace font to the h2 element, so that it now has two fonts – Lobster and monospace. In…
Change the Font Size of an Element
Inside the same <style> tag that contains your red-text class, create an entry for p elements and set the font-size to 16 pixels…
Use a CSS Class to Style an Element – freeCodeCamp
Inside your style element, change the h2 selector to .red-text and update the color’s value from blue to red. Give your h2 element the class attribute with a…