Home > DeveloperSection > Forums > Attribute substring selectors
F Scott Fitzgerald
F Scott Fitzgerald

Total Post:29

Points:203
Posted on    June-14-2013 8:58 AM

 CSS-CSS3 CSS-CSS3 
Ratings:


 1 Reply(s)
 702  View(s)
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. 



AVADHESH PATEL

Total Post:604

Points:4228
Posted on    June-15-2013 5:22 AM

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>


Don't want to miss updates? Please click the below button!

Follow MindStick