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.
-
5:30:52
SpartakusLIVE
10 hours agoDuos w/ @GloryJean || #1 Masculine Muscle MASS sears YOUR retinas with MIND BENDING content
223K3 -
3:05:49
TimcastIRL
9 hours agoNew DOCS PROVE Obama Hillary CONSPIRACY To SABOTAGE Trump Admin | Timcast IRL
225K135 -
2:29:36
Laura Loomer
9 hours agoEP136: YOU'RE FIRED! White House Vetting Crisis Continues
63K39 -
8:07
MattMorseTV
9 hours ago $6.71 earnedTrump just LOWERED PRICES by 75 PERCENT.
38.2K39 -
11:27:53
Misfit Electronic Gaming
12 hours ago $4.99 earned"LIVE" "Blind Descent' +"Dollhouse of Dead" Playtest 10 Followers till we hit 1000! We CAN do this!
42K -
21:53
Glenn Greenwald
11 hours agoMichael Tracey on the Street: What Do People Think of the Epstein Case?
129K59 -
2:26:28
megimu32
8 hours agoOTS: Board Games Gone Wild! The Loud, Weird & Chaotic Games That Raised Us
38.9K9 -
4:25:16
DamnDanieI
9 hours agoKill First, Loot Later – OTG Live
56.4K1 -
56:41
Donald Trump Jr.
13 hours agoLies, Leaks, and Lawfare: Censorship Corruption Exposed | TRIGGERED Ep.263
182K165 -
1:19:46
Precision Rifle Network
10 hours agoS4E25 Guns & Grub - Rex Is Back, I shot the 6.5PRC finally...
34.8K1