ATTRIBUTE SUBSTRING SELECTORS

F Scott Fitzgerald

Total Post:29

Points:203
Posted by  F Scott Fitzgerald
 1039  View(s)
Ratings:
Rate this:
Hi,

What is Attribute Substring selectors in css and how to use this? Any idea! I'm waiting your response.

Thanks in advance. 

  1. AVADHESH PATEL

    Post:604

    Points:4228
    Re: Attribute substring selectors

    Matches the specified substring of an attribute value

    Note  Attribute selectors are not supported in webpages that are displayed in the Microsoft Internet Explorer 5 document mode (also known as "Quirks" mode). To use attribute selectors, add a !DOCTYPE directive that specifies a standard-based document. For more information, see Defining Document Compatibility. 

    <!DOCTYPE html>
    <html>
      <head>
        <style type="text/css">
          .test        { display:none; }
          [attr*="ai"] { display:block; }
        </style>
      </head>
      <body>
        <div class="test" attr="Contains">Test for [*=] (Substring) succeeded.</div>
      </body>
    </html>

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!