How do we write context dependent selectors?
We can write Selectors that only work for certain contexts.For example; you can define a style for the <B> tag that is only triggered if the text is not only bold but also written in italics.Simply adding a normal style to the <B> tag is done like this:
B {font-size:16px}Adding a context dependent style, like the one described above is done by separating the tags with spaces instead of commas. This means that the style is only used when you have the first tag, and nested inside it the second tag, and so on.
I B {font-size: 16px;}We simply separated the contextual <I> tag from the <B> tag with a space.
Back
Sponsored links
ASP.NET 3.5 Hosting on Windows 2008!
ASP.NET 3.5/2.0 Hosting on Windows 2008 & 2003! AJAX, LINQ, & Silverlight Ready! 3 Mo. Free!!
ASP.NET 3.5/2.0 Hosting on Windows 2008 & 2003! AJAX, LINQ, & Silverlight Ready! 3 Mo. Free!!
Build IT Knowledge with Current & Trusted Content
Helps Employees Develop & Hone New Technical Programming Skills. Sign Up & Get Full Access.
Helps Employees Develop & Hone New Technical Programming Skills. Sign Up & Get Full Access.
Check Out IT Certification Preparation Materials
Sign Up With SkillSoft & Get Access to Training Materials for Over 50 Professional Certifications.
Sign Up With SkillSoft & Get Access to Training Materials for Over 50 Professional Certifications.
SFTP components for .NET
Add complete SSH and SFTP support to your .NET framework application
Add complete SSH and SFTP support to your .NET framework application
Experience Adobe? FLASH MEDIA SERVER 3
Introducing the media solution for total action without interruption. TRY IT NOW FOR FREE!
Introducing the media solution for total action without interruption. TRY IT NOW FOR FREE!
