css-selectors Questions
2
I know I used the word select a lot there... sorry.
Anyway, I am looking for a CSS Selector that I can use to identify HTML Select elements on a page that do not have a selection made yet so that ...
Edmondo asked 11/7, 2013 at 15:30
3
Solved
Is there a way to select one element, immediately following (or preceding) other by pure CSS?
Foe example, hide one of <br> in a <br><br> pair:
<p>text text <br><...
Bash asked 27/5, 2015 at 16:43
9
Solved
I have the following code :
<h3 class="hideIfDivEmpty">title</h3>
<div id="divId"></div>
I would like to hide the h3 element when the div is empty.
I'm willing to change ...
Randyranee asked 30/6, 2013 at 14:37
4
Solved
I have this small HTML:
<div id="column">
<div class="ticker">
<ul>
<li>Item 1</li>
</ul>
</div>
</div>
For ul elements outside of the .ticke...
Newfangled asked 22/5, 2014 at 18:31
2
Solved
I'm trying to select all anchor tags that link to external sites that do not have child image tags. If I have an image as a link, it adds the little external link icon next to those images as well,...
Chere asked 9/8, 2012 at 15:42
3
Solved
I have a nested sortable list that can have items dynamically added or removed and can be nested n-levels deep. On nesting, a new ul element is injected into whatever li element is selected to be t...
Cradlesong asked 8/4, 2009 at 22:24
6
Solved
Markup:
<li class="divider"></li>
<li class="active"><a href="#">Home</a>
<li class="divider"></li>
<li><a href="#">Blog</a></li>
...
Fantan asked 7/9, 2013 at 19:26
4
How can I write a CSS Rule that selects all div.box that are not inside .container?
The following snippet is not working because there is a div without .container inside the div.container.
di...
Nevanevada asked 24/3, 2017 at 17:5
6
Solved
I'm wondering if there is a performance issue using attribute selectors instead of class selectors.
div.test {}
div[test] {}
P.S. : I'm only interested in CSS performance, not JS.
Mary asked 9/3, 2014 at 15:36
5
If I have this HTML, how can I select all elements between #one and #two
with CSS? I can't use jQuery.
<p id="one"></p>
<p></p>
<p></p>
<p></p>
<...
Girardo asked 3/3, 2017 at 9:31
5
Solved
I had been following the discussion How to automate shadow DOM elements using selenium? to work with #shadow-root (open) elements.
While in the process of locating the Clear data button within the...
Peatroy asked 30/5, 2019 at 14:20
4
i used :empty selector in .error class. the problem is that even when there is no content inside the div with class of error, the error class is not removed completely.
when i tested in firebug, i...
Outfight asked 19/8, 2013 at 12:20
7
Is there a CSS selector that allows me to select an element based on an HTML select option value?
<select>
<option value="1">1</option>
<option value="2">2</option>...
Selfconsequence asked 9/5, 2013 at 0:54
6
Is there a way in CSS to select labels bound to input fields (via the for attribute) having the required attribute set? Something like:
label:input[required] {
...
}
Currently, I'm adding class...
Steinmetz asked 16/1, 2010 at 0:44
5
Solved
I recently started to give tailwind.css a try in my Nuxt project. so I needed to use :not(:last-child) pseudo-elements but I don't know how.
<ul>
<li
v-for="(item, index) in items&...
Buchholz asked 27/4, 2020 at 9:17
4
Solved
I have several hierarchies separately listed out below where first selector is the parent div, second is the image item within the div. But could I combine these somehow?
.outdoors .how-to-image {...
Hagai asked 11/2, 2015 at 22:5
6
Solved
Trying to find a pseudo class that'll target a <div> like this:
<div class="nav-previous">
</div>
I've tried :blank and :empty but neither can detect it. Is it just not possib...
Rammish asked 19/3, 2018 at 17:9
5
Is there a CSS rule that would match elements based on their width? If not, would it be interesting to propose that in the standard?
One could do something like code:max-width(200px) { white-space...
Decor asked 1/3, 2018 at 18:48
6
Solved
I found this CSS code and I ran it to see what it does and it outlined EVERY element on the page,
Can someone explain what the asterisk * does in CSS?
<style>
* { outline: 2px dotted red }
* ...
Transposal asked 30/7, 2009 at 3:15
3
Solved
I have this scenario:
<div id="parent">
<div id="a"></div>
<li class="b"></li>
</div>
In my case, I want to add margin-top: 5px; to class b only if it is af...
Ohg asked 30/7, 2014 at 13:11
8
Solved
Is there a way to use CSS selectors to get the middle child in a list of elements?
I know that there is no literal :middle-child selector, but is there another way without resorting to Javascript?...
Sharkskin asked 24/6, 2013 at 3:24
3
Solved
I have floated articles side by side that are 25% wide. I'm adding a clear:both after every fourth element. However I need to insert a graphical section-break inbetween the elements. And it has to ...
Sterol asked 10/9, 2012 at 16:53
3
Solved
ok I know how to do both these things separately:
#elemID { } /* selects only one element */
#elemID * { } /* selects all its children elements but not the element itself */
And I know I can do ...
Exploration asked 8/1, 2012 at 21:8
5
Solved
I have two div a child and a parent. the child contains a contact number. If there is no contact number I want the parent div to display none. I am trying to use the :empty CSS statement but I thin...
Murphey asked 14/1, 2015 at 8:11
3
Solved
I have a web page which loads content dynamically and while page loads, there is spinning wheel, I already found solution to grab content loaded immediately on page, but seems i can't find solution...
Telfore asked 10/11, 2018 at 14:57
1 Next >
© 2022 - 2025 — McMap. All rights reserved.