Logo

Navigation
  • Home
  • Services
    • ERP Solutions
    • Implementation Solutions
    • Support and Maintenance Solutions
    • Custom Solutions
    • Upgrade Solutions
    • Training and Mentoring
    • Web Solutions
    • Production Support
    • Architecture Designing
    • Independent Validation and Testing Services
    • Infrastructure Management
  • Expertise
    • Microsoft Development Expertise
    • Mobile Development
    • SQL Server Database and BI
    • SAP BI, SAP Hana, SAP BO
    • Oracle and BI
    • Oracle RAC
  • Technical Training
    • Learn Data Management
      • Business Intelligence
      • Data Mining
      • Data Modeling
      • Data Warehousing
      • Disaster Recovery
    • Learn Concepts
      • Application Development
      • Client Server
      • Cloud Computing Tutorials
      • Cluster Computing
      • CRM Tutorial
      • EDI Tutorials
      • ERP Tutorials
      • NLP
      • OOPS
      • Concepts
      • SOA Tutorial
      • Supply Chain
      • Technology Trends
      • UML
      • Virtualization
      • Web 2.0
    • Learn Java
      • JavaScript Tutorial
      • JSP Tutorials
      • J2EE
    • Learn Microsoft
      • MSAS
      • ASP.NET
      • ASP.NET 2.0
      • C Sharp
      • MS Project Training
      • Silverlight
      • SQL Server 2005
      • VB.NET 2005
    • Learn Networking
      • Networking
      • Wireless
    • Learn Oracle
      • Oracle 10g
      • PL/SQL
      • Oracle 11g Tutorials
      • Oracle 9i
      • Oracle Apps
    • Learn Programming
      • Ajax Tutorial
      • C Language
      • C++ Tutorials
      • CSS Tutorial
      • CSS3 Tutorial
      • JavaScript Tutorial
      • jQuery Tutorial
      • MainFrame
      • PHP Tutorial
      • VBScript Tutorial
      • XML Tutorial
    • Learn Software Testing
      • Software Testing Types
      • SQA
      • Testing
  • Career Training
    • Career Improvement
      • Career Articles
      • Certification Articles
      • Conflict Management
      • Core Skills
      • Decision Making
      • Entrepreneurship
      • Goal Setting
      • Life Skills
      • Performance Development
      • Personal Excellence
      • Personality Development
      • Problem Solving
      • Relationship Management
      • Self Confidence
      • Self Supervision
      • Social Networking
      • Strategic Planning
      • Time Management
    • Education Help
      • Career Tracks
      • Essay Writing
      • Internship Tips
      • Online Education
      • Scholarships
      • Student Loans
    • Managerial Skills
      • Business Communication
      • Business Networking
      • Facilitator Skills
      • Managing Change
      • Marketing Management
      • Meeting Management
      • Process Management
      • Project Management
      • Project Management Life Cycle
      • Project Management Process
      • Project Risk Management
      • Relationship Management
      • Task Management
      • Team Building
      • Virtual Team Management
    • Essential Life Skills
      • Anger Management
      • Anxiety Management
      • Attitude Development
      • Coaching and Mentoring
      • Emotional Intelligence
      • Stress Management
      • Positive Thinking
    • Communication Skills
      • Conversation Skills
      • Cross Culture Competence
      • English Vocabulary
      • Listening Skills
      • Public Speaking Skills
      • Questioning Skills
    • Soft Skills
      • Assertive Skills
      • Influence Skills
      • Leadership Skills
      • Memory Skills
      • People Skills
      • Presentation Skills
    • Finding a Job
      • Etiquette Tips
      • Group Discussions
      • HR Interviews
      • Interview Notes
      • Job Search Tips
      • Resume Tips
      • Sample Resumes
 

CSS3 Selectors

By Exforsys | on February 7, 2007 |
CSS3 Tutorial

CSS3 Selectors

The main usage of Cascading Style Sheets selectors is that it is used for binding style properties to elements in the document. The Cascading Style Sheets Level 3 selectors are compatible with many modern browsers thus making its usage more powerful and popular. In general a CSS selector is made up of a pattern that is matched against all elements in the document tree.

That is to explain in brief a pattern has set of conditions placed in it and when all conditions in the pattern are satisfied or in other words returns true value then selector is applied which means the declarations placed within the rule are applied to the element or elements that match.

That is in general the selectors take the following notation namely:

expression element ? boolean

The above means that the specification placed defines whether that element matches the selector. A set of elements or a single element from the set of elements can be selected by means of expressions defined as above and these expressions gets applied across all the elements in a sub tree.

First one must know the basic categories of selectors before going in detail.

In broad there are two basic categories of selectors. They are namely:

  • simple
  • combined

Let us see what each of these means:

simple selector:

A simple selector consists of either a type selector which is denoted by pattern E and thereby matches any E element or the universal selector which is denoted by pattern * and thereby matches all element in the document followed by zero or more attribute selectors which represents a pattern denoted as E[attr] thereby matching any E element that has an attr attribute, regardless of its value, ID selectors denoted by pattern #footer and there by matches any element with an id equal to footer, or pseudo-classes.

combined selector:

The combined selector is also called as contextual selector and this contains two or more simple selectors separated by a combinator.

The Cascading Style Sheets Level 2 also had selectors feature in it. There are some differences and some new features that are implemented in the Cascading Style Sheets Level 3. Let us see some of them namely:

Definition:

In Cascading Style Sheets Level 3 the definitions that we defined above for simple and combined selectors and many more has been redefined. That is in other words let us see how the simple selector is represented in Cascading Style Sheets Level 3.In Cascading Style Sheets Level 3 simple selector is defined as sequence of simple selectors. Like that there is change in all definition which we will see in coming sections as we define each module in detail.

Introduction of optional namespace component:

Introduction and Usage of an optional namespace component which is allowed for specification of an element type in Cascading Style Sheets Level 3. We know that type selector matches every instance of a particular element type that is in other words has a pattern denoted by pattern E and thereby matches any E element. Also a universal selector is denoted by pattern * and matches all element in the document. This new optional component usage namely the optional namespace component of Cascading Style Sheets Level 3 can be used with any of these type element selectors or the universal selector and attribute selectors.

Introduction of new combinator:

Combinators in general are used to separate the two or more simple selectors that make up a combined. There is a new combinator introduced in CSS3 namely the Indirect Adjacent combinator. Detailed explanation of types of combinators available along with the usage, syntax with the explanation in detail on the new combinator also will be made in coming sections.

Substring matching attribute selectors:

This new concept of Substring matching attribute selectors in Cascading Style Sheets Level 3 helps developers to match substrings in the value of an attribute.

new pseudo-classes:

The new pseudo-classes in Cascading Style Sheets Level 3 like :target pseudo-class helps to link a certain element within the document. There are many new pseudo-classes in Cascading Style Sheets Level 3 like the above .To mention some more are namely like :enabled and :disabled pseudo-classes which helps programmers to control the appearance of user interface elements like whether enabled or disabled as needed by them. There are still a lot more new pseudo-classes in Cascading Style Sheets Level 3 which all will be dealt in detail in coming sections.

new pseudo-elements:

The new pseudo-elements in Cascading Style Sheets Level 3 like ::selection pseudo-element helps to control the way a selected text would appear like color or any properties. Here we can note that a special notation namely "::" has been used in Cascading Style Sheets Level 3.

Modularization of Selectors:

As we have seen in our earlier section the modularization is the major concept of Cascading Style Sheets Level 3 which adds to its powerful ability. The selectors concept of Cascading Style Sheets Level 3 is also a CSS3 Module and thereby becomes an independent specification for handling.

« « CSS3 Introduction
Crucial Requirements For Successful Data Warehouses » »

Author Description

Avatar

Editorial Team at Exforsys is a team of IT Consulting and Training team led by Chandra Vennapoosa.

Free Training

RSSSubscribe 394 Followers
  • Popular
  • Recent
  • CSS3 Links Creation and Usage

    March 19, 2007 - 0 Comment
  • CSS3 Introduction

    February 6, 2007 - 0 Comment
  • CSS3 Multi Column Feature

    March 9, 2007 - 0 Comment
  • CSS3 Advantages

    March 12, 2007 - 0 Comment
  • CSS3 Opacity

    March 15, 2007 - 0 Comment
  • CSS3 Wrapping

    March 15, 2007 - 0 Comment
  • CSS3 Links Creation and Usage

    March 19, 2007 - 0 Comment
  • CSS3 Wrapping

    March 15, 2007 - 0 Comment
  • CSS3 Opacity

    March 15, 2007 - 0 Comment
  • CSS3 Advantages

    March 12, 2007 - 0 Comment
  • CSS3 Multi Column Feature

    March 9, 2007 - 0 Comment
  • CSS3 Introduction

    February 6, 2007 - 0 Comment

Exforsys e-Newsletter

ebook
 

Related Articles

  • CSS3 Links Creation and Usage
  • CSS3 Wrapping
  • CSS3 Opacity
  • CSS3 Advantages
  • CSS3 Multi Column Feature

Latest Articles

  • Project Management Techniques
  • Product Development Best Practices
  • Importance of Quality Data Management
  • How to Maximize Quality Assurance
  • Utilizing Effective Quality Assurance Strategies
  • Sitemap
  • Privacy Policy
  • DMCA
  • Trademark Information
  • Contact Us
© 2023. All Rights Reserved.IT Training and Consulting
This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish.AcceptReject Read More
Privacy & Cookies Policy

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
Non-necessary
Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.
SAVE & ACCEPT