20. ID Attributes Strategy – Overriding & Class vs. ID

Video Summary

In this lesson is about attribute strategies, and basically what the attribute is made for. So let’s say if you had a series of elements that are used to save classes that have the same style, you might want to have that single element or a group of elements to have on a slightly different style. 

Maybe you want this to have a bigger font, or other elements. Color, and this is where the ID attribute really one of the best examples I can think of you have three pricing back and maybe one is the most popular or has the best value. Maybe you want to change the style of that, to draw attention to you. That’s your best seller. You want to highlight that to show this divergence. So with that in mind, let’s start work and show you the IP strategy. So instead of like building a bunch of code, because the amount of code it would take to have three pricing packages to be able to show you that is it’d be too much to actually visibly see on here, but the idea is right now we’re just learning the basics but having the fundamentals will make things a lot easier. 

The reason why we don’t do that a lot is because ever if we wanted to change every element in the game, tag paragraph tags and every every page on the website, the paragraph and more times than not, we might want to change even in the same section maybe in water. We might want to have different sections that series paragraphs have different stylings and stuff like that. So just want to give you a heads up. you will and we’re gonna make this color so now you see that all of these colors but now, let’s just say this is my favorite sports.

I just have the border but just just bear with me that maybe maybe basketball but let’s just say we put this in so now what we can do is we can come over here to CSS styling. Or maybe I want to highlight these slides and that’s just basically how we can utilize IDs and that’s enough. Now I do want to go back to the last slide and so we are different. You are you reading from scratch in different sections. 

I would recommend you’re trying to target them for CSS I recommend using classes and whenever possible because you can only have one web page so you don’t have to over and over again. So we can use classes just as the same as it is just a little bit more flexible and we’re starting off the classroom is much easier, but it is important to understand the ID attribute because we’re gonna go in and start removing WordPress sites and we might want to change some like predetermined styling the web developer, WordPress developer developer, decided we want to go and change and so being able to understand what an ID tag is versus a class will allow you to go and rearrange stylings as you go. The reason to go over the ideas but if you are practicing this, it’s really trying to figure it out. I’d say this use classes and just experiment with that. If you want to use ideas by all means, but you will run into certain limitations.

PHP Code Snippets Powered By : XYZScripts.com