Search
 
SCRIPT & CODE EXAMPLE
 

CSS

advanced selectors

/*Advanced selectors*/
    h2 + p  /*every paragraph that is after "h2" */
    textarea ~ button /*every button that is aftrer textarea with same parent (<form> is the same parent in this example)*/
    ul > li /*every signle "li" inside of the "ul"*/
    ul li /*every "li" that goes up to "ul"*/

/*Attribute selectors*/
    p[class="review"] /*all of paragraphs with review class on them*/
    img[href^="../my code guide/"] /*every image that starts with that addres (replacing "=" with"^=")*/
    img[href$="../my code guide/"] /* its end with this attribute*/
    img[href*="../my code guide/"] /*if its contain anywhere*/
    h1[class~="site-header"] /*only works with white space seperator*/
    h1[class|="subtitle"] /*selects ones that starts with "subtitle" or "subtitle" and "-" in following*/
Comment

advanced selectors in css

/*Advanced selectors*/
    h2 + p  /*every paragraph that is after "h2" */
    textarea ~ button /*every button that is aftrer textarea with same parent (<form> is the same parent in this example)*/
    ul > li /*every signle "li" inside of the "ul"*/
    ul li /*every "li" that goes up to "ul"*/

/*Attribute selectors*/
    p[class="review"] /*all of paragraphs with review class on them*/
    img[href^="../my code guide/"] /*every image that starts with that addres (replacing "=" with"^=")*/
    img[href$="../my code guide/"] /* its end with this attribute*/
    img[href*="../my code guide/"] /*if its contain anywhere*/
    h1[class~="site-header"] /*only works with white space seperator*/
    h1[class|="subtitle"] /*selects ones that start with "subtitle" or "subtitle" and "-" in following*/
Comment

PREVIOUS NEXT
Code Example
Css :: Service Worker Navigator check 
Css :: font weight numbers 
Css :: Inline style 
Css :: promise.resolve 
Css :: how to create polaroid effect in css 
Css :: css apply style to direct children 
Css :: flex order 
Css :: devextreme css 
Css :: css margin 
Css :: radius to imported icons 
Css :: touch-action in css 
Css :: division in css 
Css :: how to make button appear on hover 
Css :: display flex 
Css :: css animation png 
Css :: css glass 
Css :: webpack alias not working in jest 
Css :: remove unused css styles 
Css :: css template 
Css :: svg background css 
Css :: move cursor 
Css :: after and before css 
Css :: css class inheritance 
Css :: html display text in alternating coloured panels 
Css :: how to move li to the right 
Css :: vertical multi color border css 
Css :: cheat codes for hmtl and css 
Css :: top 0 bottom 0 left 0 right 0 alternate css 
Css :: how to align text in css 
Css :: navbar link goes down more than expected 
ADD CONTENT
Topic
Content
Source link
Name
2+4 =