w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
asp.net invoke "target" pseudo css class
I managed to solve this one. just putting down my solution here incase someone needs it (or I get hit by a car and develop amnesia and need to resolve this in the future - hello future crudler). Ok the problem isnt linked to either the accordian, or the controls underneath. The root cause is that a postback doesnt preserve the hashtag location. So you can either do some funny stuff with the form's action, or catch the post back (on each control) and then set a startupscript as such Page.ClientScript.RegisterStartupScript(this.GetType(), "anchor", "#Section2", true); or if you are using a update panel to be nice and ajaxy (named pnl in my case) ScriptManager.RegisterStartupScript(pnl, pnl.GetType(), "anchor", "#Section2", true); you can then do some sneaky things like put the # name

Categories : HTML

When using the pseudo-class :target, how can I reverse the animation?
The :target selector is simply applying the styles to the image when the image is the target, which it is on click of the anchor as the images ID is the href of the anchor. So by clicking the anchor again, it is still the same target so the styles will still be applied, it is not toggling them. This is the exact expected behaviour. Can you not just use JS to toggle a class instead?

Categories : HTML

general sibling selector used to style target:pseudo class
From the Mozilla Developer Network: The ~ combinator separates two selectors and matches the second element only if it is preceded by the first, and both share a common parent. So in the following selectors: #home:target ~ #header #navigation #link-home if #header is succeeded in the markup by the content addressed by #home:target, it won't be matched.

Categories : CSS

Use of Pseudo-Elements in Polymer.js
I believe this plunker works how you want it to. Basically, the CSS pseudo-element has to be applied directly to the custom element (in this case the my-custom-element). I switched id="host" to it (instead of its parent div) and the code worked. <div> <my-custom-element id="host"></my-custom-element> </div> Note: The overriding nature of @host may change. Some (myself included) think it should be more for providing default, fallback styles. In this case rules in the host document will override @host rules instead of the other way around.

Categories : Javascript

How to use the first-of-type pseudo class along with the first-letter pseudo element in my style rule selector
just use both first-child pseudo class and first letter pseudo class see fiddlel - http://jsfiddle.net/QX45P/ p:first-child:first-letter { font-size: 4em; float: left; line-height: 0.8em; margin-right: 0.3em; padding-right: 0.2em; padding-bottom: 0.2em; border: solid black; border-right-width: 0.02em; border-bottom-width: 0.02em; }

Categories : CSS

Is it possible to target element by several pseudo-classes via css selector?
Yes, you can do it in the way you are asking: input[type=button]:disabled:only-child:hover Works nice: http://jsfiddle.net/TekUR/

Categories : CSS

AspectJ: target vs signature pattern to select methods on a class
Target expects an instance of the class specified, while call itself has no such restriction. That means the pointcut with just call(..) can catch static method executions as well, while one with a target(Class) can not. It only catches methods executed on an object of the specified class (hence the name 'target').

Categories : Java

Does WeakReference.Target.GetType fail if null
Yes, it will fail with a NullReferenceException, because GetType is an instance method and WeakReference.Target is null if the object has been garbage collected.

Categories : C#

define pseudo class and pseudo element in same element
Interesting question. If you're able to show us a working example we could probably be of more help. However, in theory there's nothing wrong with what you're attempting to do (although not all browsers will like it: particularly IE8 and below). The important thing to understand here is that :hover is a pseudo-class, whereas :before is a pseudo-element. Here's a quick excerpt from the standard (with thanks to this answer previously on Stack Overflow): Pseudo-classes are allowed anywhere in selectors while pseudo-elements may only be appended after the last simple selector of the selector. The mistake you're making is in your syntax: the order that you're appending them. Try this instead: #sidebar .widget li a:hover:before, #sidebar .widget li a.active:before { backgrou

Categories : CSS

What's more precedent: a CSS class or a pseudo-class with a * selector?
Both rules have the same specificity of [ 0 0 1 0 ], so the order is determined by source order. In this case, .cell is specified later in the stylesheet, so @base_color would be used. By the way, the * selector has zero specificity. Read more about CSS specificity: CSS Specificity: Things You Should Know Another good article to look at: Specifics on CSS Specificity

Categories : CSS

Init a select in dart and polymer via an http call
Have you considered putting the init code inside a created() lifecycle method? You can see an example of that at https://github.com/dart-lang/web-ui/blob/polymer/example/todomvc/web/todo_row.dart

Categories : Dart

pseudo classes not working on select and radio element
It's a pretty bad idea to try this kind of stuff. But if you really want to overwrite this basic statement, the best way is to construct with div and specific classes your radio buttons and using jQuery or javascript to set up your form. example.

Categories : HTML

First-child pseudo-class in css 2.1
If what you are looking for is to have ALL the images in the first li item then your code should work fine. If you are looking to have a margin on the first img child of every li then you'll have to change it to #recently_played_grid li img:first-child <ul> <li> <img /> << Selects this, and <img /> <img /> </li> <li> <img /> << Selects this, and <img /> <img /> </li> <li> <img /> << Selects this <img /> <img /> </li> </ul> If you want only the FIRST img in the FIRST li then you should change it to #recently_played_

Categories : HTML

CSS pseudo class overrides class
One option is to use !important: .filterTextbox { width: 150px !important; } The first rule is more specific thus getting higher priority. The !important keyword let's the browser know which rule is the desired one, regardless of it's priority. A better practice however will be not using !important as a few suggested in the comments. You can do something like this: (working jsFiddle) input[type="text"].filterTextbox { width: 150px; } Which will be more specific than the first rule.

Categories : Jquery

Group css selectors in LESS for pseudo class use
I am not sure if you can do that but this works too. I am assuming you just want to write the long pseudo class once. input[type=text], input[type=email], input[type=password], textarea { // styles for normal &:focus { // styles for focus } &:hover { } }

Categories : CSS

CSS negation pseudo class not working
For your use-case I'd suggest: div:hover div.item { opacity: 0.3; } div:hover div.item:hover { opacity: 1; } JS Fiddle demo. The problem is that your selector is looking for element with the class item, that is not hovered, within another element of the same class. Your posted CSS shows that the parent element does not have a class, and so the selector can never match.

Categories : CSS

What is the :nth() pseudo-class selector in jQuery?
What is the :nth() selector? Contrary to other answers, :nth() is not a CSS pseudo-class selector. It's a little-known positional selector used in the Sizzle engine: :nth: Finds the nth element on the page. You'll find the above definition here in the Github documentation for Sizzle. Why is it selecting different elements to :nth-child()/:nth-of-type()? The reason that nth() and your other selectors select different elements is because nth() is a zero-based index selector, while the CSS selectors are one-based index selectors. It's understandable how this can be confusing as most would assume that nth() would keep some kind of consistency with the similarly-named CSS pseudo class selectors such as nth-child() and nth-of-type() - however, as mentioned, they aren't actually relat

Categories : Jquery

active pseudo class not working
The :active-state is only active while you hold down the mouse-button on the link! It is not active until you click another link! This could be done with jQuery: $('a').click(function() { $('a.lastClickedLink').removeClass('lastClickedLink'); $(this).addClass('.lastClickedLink'); }); The link that was clicked last will have the class lastClickedLink and can then be styled through css with a.lastClickedLink {}. If you want this class to be persistent when the user comes back to the page later, you will have to use a cookie. Use jQuery cookie for this.

Categories : Jquery

nth-child() pseudo class on tags
You need to apply nth-child to <li> not <a> which are always first, last and number one child in <li> . .navItem:first-child a{ border-left: 1px solid RGB(0, 0, 0); } .navItem a{ border-bottom: 1px solid RGB(0, 0, 0); border-right: 1px solid RGB(0, 0, 0); display: inline-block; height: 30px; line-height: 30px; padding: 0 15px; white-space: nowrap; }

Categories : HTML

Repeated Pseudo-Class Selectors
This increases the css selector's specificity. Here is the relevant quote in the css specs: Note: Repeated occurrences of the same simple selector are allowed and do increase specificity. So, in this particular case, input:focus:invalid:focus will have precedence over input:focus:invalid. Here is a simpler example demonstrating the increase in css specificity with repeated occurences: css span.color.color { color: green; } span.color { color: yellow; } html <span class="color">This will be green.</span>

Categories : CSS

Concatenate pseudo & class variable
You're concatenating this which is an object to :in-viewport which is a string, and so the object is being converted toString and the result is [object HTMLDivElement]:in-viewport, which is an illegal jQuery selector. I think you're looking for something like this: $('#something').each(function(){ var current = $(this); if ($(this).is(':in-viewport')) { console.log(current.attr('id')); } }); Or in a better version of this specific code: $('#something:in-viewport').each(function(){ console.log($(this).attr('id')); });

Categories : Jquery

css pseudo-class selector why not working on :focus div
If you have copied the code directly, what I see is that you have a space between your li and focus. Please remove the spaces between :hover or :focus and the previous element and try again. Adding a space means you are referring to a descendant element which is not the case.

Categories : HTML

Pseudo-Class :hover persists when Max-Height changes
you can modify the js code to show and hide the list so as to dodge the :hover function addResults() { $(this).parents('.input-field-label-set-2-column').next().empty().append($('<b>').text($(this).text())); var v = $(this).parent(); pendSearch.call(v.prev().val(this.innerHTML)[0]); v.addClass("js-hide"); v.hide(); setTimeout(function(){v.show();},120); setTimeout(function () { v.removeClass("js-hide"); }, 350); } or, you can likely simply modify the .js-hide class so that it sets display:none; transition-duration:0; or, an aside, in good browsers, you can use the list attrib on an input in conjunction with a datalist element to avoid this any many more minor snags when doing gui suggestions...

Categories : Javascript

How to implement this menu using css pseudo-class selector?
I have come up with a solution that will get you going in the right direction. CSS can not deal with events that have to do with specific keys that are typed. You will need to use javascript, or in this case jQuery, to help you out. The keypress function is what you are looking for in this situation. I am not sure how to do the tabbing feature, but I did get the Enter and ESC features to work Here is the jQuery $('document').ready(function () { var menu = $(".hMenu"); menu.hide() $("body").on("keypress", function (e) { if (e.keyCode === 13) { //Key Code for Enter menu.fadeIn(); } if (e.keyCode === 27) { //Key Code for ESC menu.fadeOut(); } if (e.keyCode === 9) { //Key Code for Tab //Tabbing functi

Categories : Javascript

CSS pseudo-class :hover rule is not being applied
As CSS is cascading, the last rule overwrites the ones before. If you shift the a:link definition which is more general up, it should work fine. This is of course the most minimal change that happens to work.

Categories : CSS

Unable to set Border using pseudo :hover class
You need to use an !important in your CSS rule: #email:hover { box-shadow: inset 0 0 4px rgba(192,192,192,0.4); border:1px solid #bbbbbb !important; } As inline CSS always overwrites non-!important rules. But I encourage you to not use such a big inline styles and write it into a <style> block or better into an external file as it makes it easier to overwrite your rules without !important: #email { display:inline-block; margin-top:10px; width:180px; height:30px; border:1px solid #cccccc; border-radius:1px; padding-left:8; padding-right:8; } #email:hover { box-shadow: inset 0 0 4px rgba(192,192,192,0.4); border:1px solid #bbbbbb; }

Categories : HTML

Hover States - Can't Apply Pseudo-class
You want the :hover on the a, not the image a:hover .search { display:block; } a:hover .play { visibility:hidden; } a:hover .cover { display:block; } DEMO The problem with your current CSS is that when you hover over the magnifying glass icon, you are no longer hovering the image so it reverts to it's initial state.

Categories : HTML

CSS Pseudo class active behaves like event bubbling
Yeah, CSS pseudo selectors works pretty much the same way event bubbling works in Javascript though you can't do something like e.stopPropagation() in CSS which we can in JS. If it is really must for you to stop event bubble, I would suggest you to go the Javascript way & :active can be emulate by mousedown () & mouseup() events.

Categories : CSS

What is the default way an iOS device handles the :hover pseudo-class?
As you're probably aware, iOS doesn't actually support the :hover pseudo-class simply because it uses a touch-based interface. It does fire mouse events in specific circumstances for compatibility reasons, but this behavior isn't the most reliable way to emulate or trigger an element's :hover state, since you can't actually hover an element with your finger the same way you do with a mouse pointer. From this tech note: Additionally, Safari on iPhone OS users interact with your web content directly with their fingers, rather than using a mouse. This creates new opportunities for touch-enabled interfaces, but does not work well with hover states. For example, a mouse pointer can hover over a webpage element and trigger an event; a finger on a Multi-Touch screen cannot. For this reason, m

Categories : Javascript

How to achieve pseudo-classical inheritance right on the class declaration?
I know this doesn't answer your question because as far as I know there is no good way to put everything in the function constructor and have it use prototype. As I've commented; if you have trouble with the JavaScript syntax then typescript could be a good alternative. Here is a helper function that I use for inheritance and overriding (calling super) using JavaScript (without Object.create) var goog={};//inherits from closure library base //http://docs.closure-library.googlecode.com/git/closure_goog_base.js.source.html#line1466 // with modifications for _super goog.inherits = function(childCtor, parentCtor) { function tempCtor() {}; tempCtor.prototype = parentCtor.prototype; childCtor.prototype = new tempCtor(); childCtor.prototype.constructor = childCtor; // modified _s

Categories : Javascript

How to change the hover pseudo class of an element using jquery
One of the solution can be applying another class on click on the button then change the css defs. $('#my-button').click(function(){ $('.textbox').toggleClass('active'); // .addClass('active'); }) then .textbox.active:hover .ui-resizable-sw {background: rgba(0, 0, 0, 0.5) !important;} .textbox.active:hover .ui-resizable-se {background: rgba(0, 0, 0, 0.5) !important;} .textbox.active:hover .ui-resizable-nw {background: rgba(0, 0, 0, 0.5) !important;} .textbox.active:hover .ui-resizable-ne {background: rgba(0, 0, 0, 0.5) !important;}

Categories : Jquery

Possible reasons for a class cast from an instance to its own class to fail?
When you have multiple class loaders, you can load the two classes with the same name at the same time. These two class are not interchangable. Unfortunately the ClassCastException gives you no indication that while the classes have the same name, they are not the same class and have different class loaders.

Categories : Java

Adding separator line between menu items (pseudo-class ignored)
All of the <a>s are first children of their respective <li>s. You need to target the first <li> instead. Try this: .top-bar-section ul li:first-child > a { border-left: 1px solid white; } For future reference, please include your HTML in the question.

Categories : PHP

Alternating element's style using pseudo class that are in separate parents
nth-of-type is alway checking for the postition of the element in his parent. Hence, your div's are always first child of .post. That's why it doesnt work. But you can check the child position of it's parent. Just like that : .post:nth-of-type(even) div.title{} .post:nth-of-type(odd) div.title{}

Categories : CSS

*** No rule to make target 'class.cpp', needed by `build/....x86/class.o` Stop. error in Ubuntu
You get this error when you don't have a file (Checker.cpp) here to make. Its probably for the following reasons : Your current directory is not the directory in which your file resides. The file may have been moved to somewhere else. Or the worse , the file doesn't exist.

Categories : C++

IE10 hover pseudo class doesn't work without background color
looks like this can be fixed by using a transparent png as a background image. EDIT: sorry, shouldve expanded on this more. in ie, if you use the pseudo class of :hover on an element that has a transparent background color, the hover is only triggered when the mouse is over a solid/nontransparent spot. this is usually not an issue unless you are doing something like this: <style> #content { height:20px; overflow:hidden; position:absolute; width:100px; } #content:hover { height:100px; overflow:visible; } #hoverContent { position:absolute; top:20px; } </style> <div id="content"> <div style="float:left;">wtf</div> <div style="float:right;">hrm</div> <div id="hoverContent">lol</div> </div> in ie, if you

Categories : CSS

android fail to SELECT MAX(_id) FROM
Cursor mCursor = database.rawQuery(MY_QUERY, null); //LINE 80 database is null (Caused by: java.lang.NullPointerException). You need to initialize your database data member before using it.

Categories : Android

target all parents(".class") of a specific class jquery
like this : $(document).on("click", '.leaf', function () { $(this).closest('li').parents('li').find('> .leaf > p').css('color', 'red'); }); FIDDLE

Categories : Jquery

Try to select but leave blank if fail
Using the data you provided a left Join will work. Using these two tables: |Tickets | +--+--------+----------+------+ |ID|Name |Date |Cat_id| +--+--------+----------+------+ |1 |Ticket 1|2013-07-13|1 | +--+--------+----------+------+ |2 |Ticket 2|2013-06-13|2 | +--+--------+----------+------+ |3 |Ticket 3|2013-06-25|4 | +--+--------+----------+------+ |Category | +--+--------+ |ID|Name | +--+--------+ |1 |sample 1| +--+--------+ |2 |sample 2| +--+--------+ |3 |sample 3| +--+--------+ Using this query gives what you are looking for: SELECT t.id, t.name ,t.date, c.name FROM `stack overflow`.tickets as t Left Join category as c on c.id = t.cat_id T

Categories : Mysql

Is it possible to target a
This is not possible purely in CSS, as CSS does not have any understanding of selected dropdown options. (Even if it did, it would not be possible to match the option then go back up to the parent select). As such, JavaScript is your only option here. I can provide an example, but you didn't tag the question JavaScript so I don't know if this is an option for you.

Categories : HTML



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.