Selectors are patterns that match against elements in a document tree. In a CSS rule, they are used to define styles for elements that match the pattern.
-1
votes
2answers
17 views
CSS pseudo-class selector on box-shadow hover
Is there a CSS pseudo-class selector that selects an element depending on whether the mouse is hovering on its box-shadow (if exist)? Or, how do I make it so that :hover covers the box-shadow as well?
...
-1
votes
1answer
49 views
Css selector - different level
I have a big problem with coding on css
HTML
<div id='wrapper'>
<div id='first'></div>
...
</div>
...
<div id='second'></div>
CSS
<style>
...
2
votes
2answers
20 views
nth-child calculating incorrectly
I have a set of divs, I want every third one to have no margin on the right hand side. Naturally, I assumed div:nth-child(3n) would work. It does not. I did some research and it seems like it's ...
0
votes
1answer
27 views
Css Selector of page for selenium
I have the following content
<div class="startpack">
<div class="test-class">
<div id="login">
<div id="frag">
<h3>blah blah blah</h3>
...
1
vote
4answers
66 views
Is there a way to shorten css selectors?
I have:
#signUpForm h1, #signUpForm p{
color: #fff;
}
Is there a way to shorten this such as:
#signUpForm h1, p{
color: #fff;
}
Or do I need to create a new comma separated selector each ...
3
votes
1answer
34 views
How are media queries counted in IE's CSS selectors limit?
Any idea how does IE treat media queries regarding this CSS selector limit?
Does it see it as a single CSS rule or it sees it as 1 rule (the @media declaration) + number of rules inside the @media ...
3
votes
1answer
33 views
How to Create CSS Selector Element including index
I am building a selenium-based test application uses CSS Selectors or XPath strings, and am attempting to test menu items that appear on hover. Using "Inspect Element" in Chrome and in FireFox by ...
0
votes
1answer
25 views
Chaining multiple nth-child selectors together [duplicate]
CSS3 selectors can get pretty in-depth and I'm having a problem that chaining a couple together using SASS.
CODE
SASS:
$greymd: #a7aaac;
$blue: #405daa;
$orange: #cabc18;
#C05 {
...
0
votes
1answer
20 views
complex jquery/css selector
I need a selector for this code:
<div class="panel-heading BWHeadingForSection">
<a style="text-decoration:none" href="#faq-cat-1-sub-2" data-parent="#accordion-cat-2" ...
-2
votes
3answers
45 views
How do I do an “and” selector? [duplicate]
I would like to select all elements that have both one class AND another class. For example, in the following markup, I only want to select elements containing class "foo" and class "bar", but not ...
1
vote
2answers
38 views
Have specific CSS if a class is after another element with a particular ID
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 ...
1
vote
3answers
37 views
how to locate an element by value using css selector in webdriver?
For the following element, how to find it by the value of the td using css selector? In this case it's "unique text"
<td class="someclass" colspan="3">
unique text
</td>
1
vote
3answers
72 views
Select an element by the text it contains with Selenium Webdriver
I've jjust started off with Selenium Webdriver and I've hit an issuee straight away involving the buttons I'm trying to select/click all have no IDs and share the same class.
So I'm wondering how I ...
0
votes
0answers
30 views
Need CSS Selector [duplicate]
I need to make this:
input[type=checkbox]:checked (neededsign) label
when I did it, it should effect all "label"s on screen.
there's a sign as "~" but it effects only "after" checked. I need to ...
0
votes
1answer
35 views
CSS3 :not() selector ignored by IE9
CSS:
input:not([type=submit]):focus,
input:not([type=file]):focus,
textarea:focus {
background: #f8f8f8;
-webkit-box-shadow: 0 0 5px 0 rgba(67,67,67,0.3);
box-shadow: 0 0 5px 0 ...
2
votes
3answers
45 views
Selector to find first matching level of elements
Having the following structure:
<ul>
<li>
<div><span class="node">Content1</span></div>
</li>
<li>
<div><span ...
1
vote
1answer
36 views
Proper way to use :not selector along with “attribute contains” selector
I am creating a bootstrap layout and have a need to collapse the padding/margin on all col-* columns except col-xs-* columns. I tried the below selector to no avail.
.grid ...
0
votes
1answer
26 views
Set font-family for all elements
When I have set the font-family for html, body..
How can avoid restating the font-family for buttons, input, textarea etc.?
It seems to always default to some other font than my main font-family, on ...
0
votes
0answers
24 views
Select each element where a sub element fulfills a condition [duplicate]
I want to select HTML elements using CSS selectors, however, only if a condition matches, which depends on sub elements.
Is that possible? If not, are there any workarounds?
Example for better ...
1
vote
1answer
25 views
Active state pseudo class and Adjacent element selector combined on IE
I'm currently having an issue with this on IE - http://jsbin.com/riyaxewo/4
HTML
<div class="a">
1
</div>
<div class="b">
2
</div>
CSS
.a, .b {
height: 50px;
...
1
vote
2answers
34 views
CSS Selector to get the element attribute value
the web structure like this
<td class='hey'>
<a href="https://xxx.com">Fist one</a>
</td>
This is my selector
m_URL = sel.css("td.hey a:nth-child(1)[href] ...
0
votes
1answer
38 views
CSS Selector Hierarchy?
I have two classes that I think are pointing to the same thing, but it doesn't appear so when using 'left.'
When I edit 'left' for the ".side-menu" selector, nothing happens, but when I change the ...
2
votes
1answer
35 views
Universal selector usage and differences
In the Twitter Bootstrap CSS, you see this:
* {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
:before, :after {
-webkit-box-sizing: ...
1
vote
2answers
16 views
CSS Class Attribute Selector with hover
is this not possible or do I have a syntax error?
I've tried it multiple ways, but nothing worked.
I have some divs using the classes works1, works2, etc..
and I want to define a general hover ...
0
votes
2answers
42 views
Select class within a class in CSS
My html has two classes, 'relevant' and 'a'. I'm wondering how to select < p > elements that are part of both classes. Not just one or the other, both at the same time. Is there a way to do this?
...
0
votes
1answer
15 views
Find element with attribute with value starting with an integer in capybara selenium
I was trying to locate an element with attribute whose value is starting with an integer.
<div data-id=2009ac> ... </div>
And whine I use css locator, as below, to locate the element
...
0
votes
0answers
9 views
Unable to click on item contained in a dynamically changing dropdown box
I am having problem in clicking on a item contained in a dynamically changing drop down. The item selected determines the list of values in a second dropdown box.
Here is the html for the dropdown
...
0
votes
2answers
16 views
Succinct way of specifying two values for an attribute in css selector
I have a css selector like as follows:
#foo input[type=number].form-control, #foo input[type=text].form-control
Is there a more succinct syntax like:
#foo input[type=number,text].form-control
...
1
vote
5answers
39 views
When input has :focus, dont trigger :hover styles
I got a input which I styled with a :focus and :hover.
When the input has :focus, I don't want to have the :hover style triggered when I hover over the input.
How am I supposed to style that?
My ...
-1
votes
2answers
24 views
Why do I have to separate CSS3 tags with a comma and not a space?
I thought in CSS3 that you could have more than one tag in a style sheet. Why would h1, h2, h3 work but then h1 h2 h3 not work. I have seen spaces before but i also could not get the > to work for ...
0
votes
1answer
22 views
css or xpath :select the first 2 elements
I practice Scrapy and want to ask a question:
the website I want to scrap has a structure like this:
<td class="c3">
<div class="text">
<a class="title" href="https:// ...
-2
votes
1answer
42 views
Why is last-child not working when nested in an SCSS file? [closed]
Using SCSS, any idea why the :last-child selector is not being applied in the example below?
<form class="form-horizontal">
<div class="form-input-group">x</div>
<div ...
1
vote
1answer
38 views
Modify Bootstrap LESS files to use an ID selector
Briefly, what I'm trying to do is apply a custom ID selector on top of Bootstrap.CSS so that I don't break other CSS on a website. So this :
.col-xs-1, .col-sm-1, .col-md-1, .col-lg-1, .col-xs-2, ...
0
votes
0answers
41 views
CSS case sensitive class names [duplicate]
I am using pdf2htmlEX tool to convert PDF documents into HTML5 content. The tool works fine, gives me great results. I do have one problem with case-sensitive class names that is applied to a page ...
1
vote
1answer
41 views
Genexus CSS3 [attribute*=value] selector
I want to use the CSS3 [attribute*=value] selector, eg:
a[src*="petteni"]{text-align:left;}
how can I do it in Genexus Evolution2 Upgrade5?
I'm not able to find such an option in the "Theme ...
2
votes
1answer
21 views
newbie in scrapy : how to response.css scrap the text part?
When I practice, I want to catch only the text part (1,2,3,4,5...), without the part how can I write the response.css("td[class='c1']")?
scrapy shell "https://tw.movies.yahoo.com/chart.html"
...
0
votes
1answer
31 views
trying to target another li member - only partially working [duplicate]
I have a li list with 2 items in it, which are "RMS" and "RPM". When you rollover RMS the background changes and the RPM is targeted with the following to make the RPM element change to red. I need ...
-1
votes
5answers
52 views
Why doesn't the adjacent sibling selector work?
According to the definition of adjacent sibling selector the following code should work. However it does not. I don't seem to find any mistake.
<!DOCTYPE html>
<html>
<head>
...
1
vote
1answer
49 views
Why does css nth-child selector not work as expected? [duplicate]
According to this article: http://css-tricks.com/how-nth-child-works/ the nth-child selector should work different.
In my case I have to use .drag_box:nth-child(3n+2){} to select every third div but ...
1
vote
3answers
58 views
polymer /deep/ selector is not working in mobile devices
I trying to rearrange layouts when device screen is resized, so i do this:
if(screenOrientation == SCREEN_ORIENTATION_LANDSCAPE) {
document.querySelector("html /deep/ ...
0
votes
2answers
34 views
How to use “or” and “and” operators in “value” field of css selector in json
In the below code i want "or" "and" operator in the value field
so that i dont have to write a new step everytime if i found diff css-selectors pointing to same location.
And thanks in Advance
{
...
-2
votes
1answer
28 views
How to go by index in CSS selector?
How to go by index in CSS selector? I am talking about Selenium identification here. say I have to point out to 5th <td> tag under a specific <a> tag.
-2
votes
1answer
37 views
CSS selector not working, why?
I have this jsFiddle.
I am trying to obtain the value of the repositoryId on Line 238:
<a href="/chain/admin/config/editRepository.action?planKey=AB-CSD&repositoryId=28049450">
In ...
0
votes
2answers
30 views
CSS nth-of-type not working as expected
What am I missing out on the functionality of the nth-of-type CSS3 selector?
Please see this codepen
http://codepen.io/tuleby/pen/oqKAG
The desired result is three even rows with 6 divs on each, and ...
0
votes
1answer
38 views
How to use CSS selectors to retrieve specific links lying in some class using BeautifulSoup?
I am new to Python and I am learning it for scraping purposes I am using BeautifulSoup to collect links (i.e href of 'a' tag). I am trying to collect the links under the "UPCOMING EVENTS" tab of site ...
0
votes
0answers
31 views
Apply style to parent div based on child div using css [duplicate]
I need to apply the style for parent div tag based on child class.
In the below code class(jqx-grid-group-expand) contains in the first position so parent tag(row0grid) display text color is red. In ...
2
votes
2answers
51 views
Universal selector * and pseudo elements
Does the universal selector * affect pseudo elements like :before and :after?
Let me use an example:
When doing this:
* { box-sizing: border-box; }
...doesn't the above declaration automatically ...
2
votes
1answer
45 views
:first-of-type selector for input type=“text”
I've got the following situation:
<input type="hidden">
<input type="text">
<input type="hidden">
<input type="text">
<input type="text">
<input type="text">
...
0
votes
3answers
62 views
Click all elements with same CssSelector or same XPath FindElements
In Visual Studio writing the code for Selenium WebDriver, these two codes for the same button work fine only once.
Click the button By Css Selector:
...
0
votes
3answers
27 views
how to select element parent-child
I have a structure like this:
<div class="home_box">
<a href="#">
<img alt="" src="/10829_rf-sicherheit/images/home_boxes/home1.jpg">
<span ...