CSS Transform and Pseudo classes

Using :after, I'm trying to create brutalist pseudo 3D button. But the :after is showing above the intended element. What I'm Trying to accomplish What I'm getting Edit: Obviously the transform is getting in the way, research has yet to yield a wh...
more »

2017-11-09 22:11 (2) Answers

select <li> that does not have <a>

Bonjour, I would like to make sure to always have the same padding in <li>, but when it's a link that the padding is in the <a> (for large selection area). li a { padding: 1rem; } li:not(a) { padding: 1rem; } <ul> ...
more »

2017-10-17 12:10 (3) Answers

CSS selector for empty file input

I know that styling file input is pretty minimal, which is not a bad thing. Is there some way of selecting file input which is empty? The plan is to show or hide a submit button depending on whether the file input is empty. ...
more »

2017-08-31 04:08 (2) Answers

Pseudo-elements styles priority

I was playing with pseudo-elements styles and came across a behavior that puzzled me Consider the following css and html HTML: <p> Note: As a rule, double colons (::) should be used instead of a single colon (:). This distinguishe...
more »

2017-07-26 13:07 (1) Answers

nth-child every eight (8)

I need to repeat a pattern every eight elements like this using nth-child. ■□■□ □■□■ I've been trying to figure out a formula for this but I don't seem to get it right. section { width: 220px; } div { width: 50px; h...
more »

2017-07-11 16:07 (2) Answers

How to only affect siblings with Last of type

I want to target the last div in a container but my styles only seem to affect the child divs and not the sibling divs. How do I constrain those styles to the sibling level? In the code below, the last .sibling should be affected but every .child-2 ...
more »

2017-07-09 22:07 (2) Answers

Nth-of-type ignored classes

So I have this html <div> <div class="item"></div> <div class="item inactive"></div> <div class="item inactive"></div> <div> And this css .item.inactive:nth-of-type(1) { do stuff f...
more »

2017-07-09 08:07 (2) Answers

animated shadow effect with fluctuating shadow

How to create continuous changing shadow of text that fluctuates automatically on users side like CSS effect that is animated text with continuous changing shadow width. I know how to add CSS shadow but how to make it fluctuating? #shadow { ...
more »

2017-07-02 18:07 (2) Answers

Specificity issue in CSS

So I have a list of items inside a div with the class "book-select" and one of the li's in my unordered list has the class "selected." According to the CSS rules I've defined, the li's in the div have the background color "skyblue" and the one li wi...
more »

2017-06-09 17:06 (2) Answers

Force child to inherit parent color on hover

I have a table where in each column they have a different color for the text part. What I like to do on a row hovering is to highlight with the background and have all the text shift to one color instead of their individual colors on normal showing....
more »

2017-05-28 00:05 (2) Answers