Love Hate is how I taught myself to remember the sequence. The order for the order (LVHA) was just incredibly easy to remember on your own. It had not spoken anything, or really gave me a sense of meaning. But love hates works. So what is LVHA?
1. a: Link
2nd a: visited
3. a: hover
4. a: active
LVHA is the order that you should specify your link rules in CSS so that they work together. The way she is designed to work in CSS, every choice has a peculiarity. So, like something else in the cascade, if there are two selectors that both apply one factor, then one with higher selectivity is downloaded. Put them in the wrong order, and you could end up with a page that does not show your style rules as you intended.
The only two you can change your order are: a: link and: visited (primarily because a link is only either or never both). Now keep in mind that you can edit multiple items with links, but always keep in mind the peculiarities. To give an example of a possible problem, check the following CSS:
Problem Order
A: link {background color: white; Color: blue}
A: active (background color: blue; color: white;}
A: hover (background color: black; color: white;}
A: visited {background color: white; Color: green;}
If you use the above CSS, all of this will work outside of the active rules. They will not show. Why? As I said before, visited and the link does not have to be in a certain order (although it should preferably be in the LVHA row to maintain consistency), but actively need to be followed by hover. Because of the activation of the sailplanes, these items are broken. Simply switching positions of function and hover (within CSS) will fix the order of cascade and allow everyone to work.
1. a: Link
2nd a: visited
3. a: hover
4. a: active
LVHA is the order that you should specify your link rules in CSS so that they work together. The way she is designed to work in CSS, every choice has a peculiarity. So, like something else in the cascade, if there are two selectors that both apply one factor, then one with higher selectivity is downloaded. Put them in the wrong order, and you could end up with a page that does not show your style rules as you intended.
The only two you can change your order are: a: link and: visited (primarily because a link is only either or never both). Now keep in mind that you can edit multiple items with links, but always keep in mind the peculiarities. To give an example of a possible problem, check the following CSS:
Problem Order
A: link {background color: white; Color: blue}
A: active (background color: blue; color: white;}
A: hover (background color: black; color: white;}
A: visited {background color: white; Color: green;}
If you use the above CSS, all of this will work outside of the active rules. They will not show. Why? As I said before, visited and the link does not have to be in a certain order (although it should preferably be in the LVHA row to maintain consistency), but actively need to be followed by hover. Because of the activation of the sailplanes, these items are broken. Simply switching positions of function and hover (within CSS) will fix the order of cascade and allow everyone to work.
Correct order
A: link {background color: white; Color: blue}
A: hover (background color: black; color: white;}
A: active (background color: blue; color: white;}
A: visited {background color: white; Color: green;}
In CSS2 we could combine our satellite time so we could customize it further. An example that you could regularly hover for a link, but do it differently for a visited link:
A: visited: hover (background color: green; color: black;}
Overall, as long as you remember love hate, the peculiarities of making links are not terribly complicated.
A: link {background color: white; Color: blue}
A: hover (background color: black; color: white;}
A: active (background color: blue; color: white;}
A: visited {background color: white; Color: green;}
In CSS2 we could combine our satellite time so we could customize it further. An example that you could regularly hover for a link, but do it differently for a visited link:
A: visited: hover (background color: green; color: black;}
Overall, as long as you remember love hate, the peculiarities of making links are not terribly complicated.
0 comments:
Post a Comment