Questions tagged as 'css-seletores'

1
answer

Difference between pseudo-class (colon :) and pseudo-element (double colon ::) in CSS

I would like to know what are the differences between these two CSS concepts, in order to understand and point out what is one, and what may be the other. For example: :hover , ::before . What I've understood so far is that -...
asked by 09.10.2015 / 05:29
1
answer

How do the selectors work, +, ~ in CSS?

Selector + div + p { font-size: 20px; } <div> </div> <p>Este é um paragrafo</p> <p>Este é outro paragrafo</p>    Get the first element found after your declaration. Selector ~ d...
asked by 04.04.2017 / 15:09
1
answer

Working Dynamic Selectors (or Multiple Selectors) in Jquery

I have a Javascript (Jquery) code that takes characters from one DIV and throws this result to another DIV. For the DIV where I get the characters I created a function that adds a class dynamically, being p0, p1, p2, and so on. See: $('.listag...
asked by 18.06.2018 / 02:05
2
answers

Is there a css selector that selects elements through your text?

I want to add background to the row of a table where one of its columns is: Value 1 . I tried using pseudo-class contains and innerHTML but all to no avail. Code: table tr td [innerHTML="Valor 1"]{ background: red;...
asked by 27.03.2017 / 18:49
1
answer

Delete specific ids in querySelectorAll

I want to get quantities of elements coming from an array: document.querySelectorAll('select,input,textarea'); alert(Object.keys(arr).length);//19 Inside the array I have 4 elements to exclude, where I try to use the :not : document...
asked by 11.06.2018 / 16:49
1
answer

How to change another element with pure CSS?

How can I change another element with pure CSS, from an element? I tried to do this but it did not roll. I do not really know the selectors and wonders of CSS. input { display: block; transition: top .3s, left .3s; } label {...
asked by 11.10.2017 / 17:21
3
answers

css select only first level

I have a menu with up to 3 levels of nested lists. I need to select only the first level text and ignore the nested content. I tried to use .menu > ul> li {} (and some variations of it) and it did not work out what I needed. I tr...
asked by 05.10.2016 / 19:28
1
answer

Difference between pseudo-class (colon :) and pseudo-element (double colon ::) in CSS

I would like to know what are the differences between these two CSS concepts, in order to understand and point out what is one, and what may be the other. For example: :hover , ::before . What I've understood so far is that -...
asked by 09.10.2015 / 05:29
1
answer

Problems with attribute: css not ()

I'm having a problem editing a h2 with css and within that h2 has a span but wanted to apply the style in h2 but I do not want the style to apply to my span I'm using the :not(span) selector for this how...
asked by 11.05.2018 / 16:31
1
answer

How do the selectors work, +, ~ in CSS?

Selector + div + p { font-size: 20px; } <div> </div> <p>Este é um paragrafo</p> <p>Este é outro paragrafo</p>    Get the first element found after your declaration. Selector ~ d...
asked by 04.04.2017 / 15:09