How can you specify link attributes inside a class in main.css.
The standard link attribute is fine when put in a non defined area of the CSS file.
a:link { color:white }
However if I want to create a class so that I am only defining how the attributes apply to a menu it errors as a syntax error. For example.
menuLinks {
a:link { color:white }
}
Will show as an error, so how can I define link attributes within a class. I am using visual web developer 2010
You cannot “nest” brace blocks.
Assuming
menuLinksis theidof the object, use this…If
menuLinksis theclassof the object, use this…UPDATE based on comments…
Instead of having the individual blocks like this…
You can combine them into a single block…
Which can also be written like this which can be easier to read, depending on how many items you have…