Premium Only Content

Styling with CSS by Id and Class Selectors plus Bootstrap Button Example
The lecture shows you how to select an HTML element for styling with CSS using its id or class attribute instead of using the type selector that targets all elements of a specific name.
Using a type selector is usually not the best practice because HTML web pages usually have hundreds of elements and changing all of them at once to comfort to a specific style might cause inconsistencies in the design.
You can select a specific element for styling with CSS using its id attribute. Only one, and only one, element may have that unique identifier.
If you need to select multiple elements for styling under the same ruleset, you can use the class attribute. It turns out using a class is usually the most popular and safe choice for best practice. When in doubt, just use a class.
The lecture also gives the example of leveraging CSS code already written by somebody else, like the Bootstrap design system. Because the class definitions are already written for you, all you have to do is use the class name if you want to adopt the same style for your web page element, provided you link the Bootstrap spreadsheet to make it available in your document.
-
23:54
Tactical Advisor
4 hours agoAll Carbon Fiber Rifle | Vault Room Live Stream 032
25K4 -
47:09
Vince Dao
5 hours ago $13.06 earnedFed Chair, Pam Bondi Consider RESIGNING as Trump Scores MAJOR Economic and Immigration Victories
42.2K35 -
47:41
Michael Franzese
15 hours agoI Don’t Believe the Epstein Case Is Closed — Here’s Why
53.6K103 -
36:50
The Brett Cooper Show
2 days ago $12.36 earnedWhy Conservatives Are Outraged At Trump & Superman Controversy | Episode 47
62.1K83 -
16:43
Blackstone Griddles
2 days ago3 Classic Recipes for New Griddle Owners with CJ Frazier
38.5K2 -
LIVE
VladsGamingCartel
7 hours ago7 Days to Die | Vlad & Tippsy Stream #BadAtGaming
113 watching -
35:38
Sam Sorbo
7 hours agoLIVE from TPUSA SAS: Fighting for Parents, Freedom, and the First Amendment
31.1K7 -
16:09
Professor Nez
7 hours ago🚨BIDEN'S DOCTOR STONEWALLS: What Are They HIDING?
37.4K19 -
3:08:37
I_Came_With_Fire_Podcast
16 hours agoThe U.S. is Reverse Engineering UAP Technology Faster Than China
33.5K15 -
40:27
The Rubin Report
9 hours agoThis Democrat Is Willing to Be Honest About How They Lost Their Way | Jim Himes
155K123