pseudo-class

Firefox not displaying properly :before and :after pseudo-elements

自作多情 提交于 2019-12-01 18:37:30
问题 On every other browser the webpage looks fine except Firefox. Even Internet Explorer! The pseudo elements float all over the document or even aren't displayed after the first ones are. Is there any solution of this behaviour? CSS span[property="dc:date dc:created"]::before{ position: absolute; top: 60px; content: ''; display: block; background-color: #005691; width: 60px; height: 20px; } span[property="dc:date dc:created"]::after{ position: absolute; top: 60px; right: 0; width: 0px; height:

Firefox not displaying properly :before and :after pseudo-elements

百般思念 提交于 2019-12-01 17:43:45
On every other browser the webpage looks fine except Firefox. Even Internet Explorer! The pseudo elements float all over the document or even aren't displayed after the first ones are. Is there any solution of this behaviour? CSS span[property="dc:date dc:created"]::before{ position: absolute; top: 60px; content: ''; display: block; background-color: #005691; width: 60px; height: 20px; } span[property="dc:date dc:created"]::after{ position: absolute; top: 60px; right: 0; width: 0px; height: 0px; border-top: 20px solid #01416F; border-right: 20px solid rgba(0, 0, 0, 0); content: ''; } http:/

Combining Pseudo-selectors in CSS?

天大地大妈咪最大 提交于 2019-12-01 16:44:10
I mean if I need, for example, selected text in a hovered link be red, could I use the following code in CSS style? .abc:hover:selection{color:red} and <a href="123" class="abc">4567890</a> Would that link, when I select part of it, become red colored when I hover it and is this correct syntax for such pseudo-classes combining? If you're talking about pseudo-classes, then yes, you can combine them in any order. Except in this case, ::selection is not a pseudo-class, it's a pseudo-element that's not part of CSS1 or CSS2, or any current spec for that matter. And this is where the term "pseudo

css first-letter for link

若如初见. 提交于 2019-12-01 15:28:20
问题 First letter pseudo class works perfect for p element but not for anchor(links). Why? How to make the first-letter style different for <a> element a:first-letter { font-size:200%; text-transform:uppercase; color:#8A2BE2; } 回答1: How about this http://jsfiddle.net/raynesax/8W7FF/8/ 回答2: According to the W3 spec, the :first-letter pseudo-element only work for a block element, which a is not. Oddly, *:first-letter caused the first letter to transform, at Chrome 14 and Firefox 3.6.23. Fiddle: http

Combining Pseudo-selectors in CSS?

半城伤御伤魂 提交于 2019-12-01 14:32:38
问题 I mean if I need, for example, selected text in a hovered link be red, could I use the following code in CSS style? .abc:hover:selection{color:red} and <a href="123" class="abc">4567890</a> Would that link, when I select part of it, become red colored when I hover it and is this correct syntax for such pseudo-classes combining? 回答1: If you're talking about pseudo-classes, then yes, you can combine them in any order. Except in this case, ::selection is not a pseudo-class, it's a pseudo-element

Make css :hover only affect parent element

心已入冬 提交于 2019-12-01 03:53:05
In css, how can I stop the :hover event being triggered in a parent element when a child event is hovered, so that it only gets triggered when the parent itself gets hovered? In this case my child element is actually positioned outside it's parent element with absolute positioning, so it's a bit weird when the parent changes when the child gets hovered. I made a JSFiddle to illustrate the problem. Here's a JSFiddle of the used solution to my example. Litek There is a pure css solution (even two in fact) but both come at a cost. You can add pointer-events:none; to your child element - but it

CSS for hiding multiple columns in a table

别来无恙 提交于 2019-12-01 03:43:15
I have a table similar to the one illustrated below in a SharePoint site. I cannot modify the table as it is generated dynamically but I can add external CSS to override its style. I am required to show only second column and hide first, third and fourth column. The pseudo class to hide first column is table#student tr td:first-child { display: none; } Please help me with pseudo class or any other trick to hide third and forth column. <table id="student"> <tr> <td>Role</td> <td>Merin</td> <td>Nakarmi</td> <td>30</td> <tr> <td>Role</td> <td>Tchelen</td> <td>Lilian</td> <td>22</td> </tr> <tr>

Hiding an element that contains only spaces using CSS

依然范特西╮ 提交于 2019-12-01 02:10:43
I am trying to hide the following element in an automatically generated HTML document: <p id="sitspagedesc" class="sitspagedesc"> </p> In some pages, the <p> tag will contain an inner value but in others it can contain only spaces as shown in the example. I need to find a way of hiding this so that it is hidden using CSS only, as changing the HTML is not an option. I have tried to hide it using .sitspagedesc:empty { display:none; } but this does not work, presumably on the account of the spaces the element contains. Does anyone have any good ideas? Thanks :) I don't think you can do it with

CSS Pseudo-classes with jQuery

此生再无相见时 提交于 2019-12-01 00:24:18
I've just learnt a bit jQuery, and am trying to use it for a simple color-changing effect. Let's say I have two <div >s, #foo and #bar. #foo has a lot of URLs, and has the following CSS defined: #foo a {color: blue; border-bottom: 1px dashed blue} #foo a:hover {color: black; border-bottom: 1px solid black} now I would like to change the color of the links (a:link) in #foo when the user clicks #bar, but keep the a:hover color untouched, so I write my function like this: //... $("#bar").click(function () { $("#foo a").css("color", "red"); }); //... The problem is, while this function does change

Hiding an element that contains only spaces using CSS

六月ゝ 毕业季﹏ 提交于 2019-11-30 22:28:36
问题 I am trying to hide the following element in an automatically generated HTML document: <p id="sitspagedesc" class="sitspagedesc"> </p> In some pages, the <p> tag will contain an inner value but in others it can contain only spaces as shown in the example. I need to find a way of hiding this so that it is hidden using CSS only, as changing the HTML is not an option. I have tried to hide it using .sitspagedesc:empty { display:none; } but this does not work, presumably on the account of the