tagged [css]

Sass Variable in CSS calc() function

Sass Variable in CSS calc() function I'm trying to use the `calc()` function in a Sass stylesheet, but I'm having some issues. Here's my code: If I use the literal `50px` instead of my `body_padding` ...

23 Aug at 00:4

How to make padding:auto work in CSS?

How to make padding:auto work in CSS? I am working on a legacy project that has CSS Reset with `*{ margin:0; padding:0 }` applied to everything. Now, my new code doesn't need that as it relies on Norm...

31 Aug at 07:17

Changing Background Image with CSS3 Animations

Changing Background Image with CSS3 Animations Why this isn't working? What am I doing wrong? ``` @-webkit-keyframes test { 0% { background-image: url('frame-01.png'); } 20% { background-image:...

21 Dec at 22:30

Selecting only first-level elements in jquery

Selecting only first-level elements in jquery How can I select the link elements of only the parent `` from a list like this? ``` Link Link Link Link Link Link Link

10 Jun at 20:20

Why doesn't the height of a container element increase if it contains floated elements?

Why doesn't the height of a container element increase if it contains floated elements? I would like to ask how height and float work. I have an outer div and an inner div that has content in it. Its ...

6 Oct at 17:58

Bootstrap change div order with pull-right, pull-left on 3 columns

Bootstrap change div order with pull-right, pull-left on 3 columns I’ve been working on this the whole day but don’t come up with a solution. I have 3 columns in one row in a container. 1: right conte...

Is it possible to select the last n items with nth-child?

Is it possible to select the last n items with nth-child? Using a standard list, I'm trying to select the last 2 list items. I've various permutations of `An+B` but nothing seems to select the last 2:...

16 Jul at 15:32

How can I select the element prior to a last child?

How can I select the element prior to a last child? I am looking for a CSS selector that lets me select the penultimate child of a list. which

22 Jun at 18:51

Target elements with multiple classes, within one rule

Target elements with multiple classes, within one rule I have some HTML that would have elements with multiple classes, and I need to assign them within one rule, so that the same classes could be dif...

31 Jan at 12:2

How to make blinking/flashing text with CSS 3

How to make blinking/flashing text with CSS 3 Currently, I have this code: It blinks, but it only b

25 Sep at 17:20

Clip/Crop background-image with CSS

Clip/Crop background-image with CSS I have this HTML: with this CSS: The background image I'm applying is 200x100 px, but I only want to display a cropped portion of the background image of 200x50 px....

28 Jan at 15:42

Div side by side without float

Div side by side without float How can I make div 'left' and 'right' look like columns side by side? I know I can use float:left on them and that will work... but on step 5 and 6 in here [http://www.b...

10 May at 14:12

Changing CSS pseudo-element styles via JavaScript

Changing CSS pseudo-element styles via JavaScript Is it possible to change a CSS pseudo-element style via JavaScript? For example, I want to dynamically set the color of the scrollbar like so: and I a...

CSS3 background image transition

CSS3 background image transition I'm trying to make a "fade-in fade-out" effect using the CSS transition. But I can't get this to work with the background image... The CSS: ``` .title a { display: b...

CSS Reset, default styles for common elements

CSS Reset, default styles for common elements After applying a CSS reset, I want to get back to 'normal' behavior for html elements like: p, h1..h6, strong, ul and li. Now when I say normal I mean e.g...

12 Feb at 13:42

CSS selector (id contains part of text)

CSS selector (id contains part of text) I have a question. I have elements something like this: `` element with id = someGenerated Some:Same:0:name `` element with id = someGenerated Some:Same:0:surna...

28 Aug at 09:13

CSS3 Spin Animation

CSS3 Spin Animation I have reviewed quite a few demos and have no idea why I can't get the CSS3 spin to function. I am using the latest stable release of Chrome. The fiddle: [http://jsfiddle.net/9Ryvs...

3 Sep at 08:52

CSS Equivalent of the "if" statement

CSS Equivalent of the "if" statement Is there any way to use conditional statements in CSS?

24 Sep at 22:37

My position: sticky element isn't sticky when using flexbox

My position: sticky element isn't sticky when using flexbox I was stuck on this for a little bit and thought I'd share this `position: sticky` + flexbox gotcha: My sticky div was working fine until I ...

10 Dec at 14:53

How do I apply a style to all children of an element

How do I apply a style to all children of an element I have an element with `class='myTestClass'`. How do I apply a css style to all children of this elements? I only want to apply the style to the el...

17 Oct at 23:58

Split Div Into 2 Columns Using CSS

Split Div Into 2 Columns Using CSS I have been attempting to split a div into two columns using CSS, but I have not managed to get it working yet. My basic structure is as follows: If

9 May at 19:12

How to draw a dotted line with css?

How to draw a dotted line with css? How can I draw a dotted line with CSS?

1 Sep at 13:16

How to make a vertical line in HTML

How to make a vertical line in HTML How do you make a vertical line using HTML?

17 Oct at 15:51

Select first occurring element after another element

Select first occurring element after another element I've got the following HTML code on a page: In my `.css` I've got the following selector to style the `h4` element. The HTML code above is just a s...

4 Jan at 21:33

Styling an input type="file" button

Styling an input type="file" button How do you style an input `type="file"` button?

9 Sep at 02:2