Tag: c

50 votes
10 answers
2.2K views
Which characters are valid in CSS class names/selectors?

What characters/symbols are allowed within the CSS class selectors? I know that the following characters are i

avatar
Scot
0 1 0 9
asked 07 September, 2021
54 votes
27 answers
2.4K views
How to align content of a div to the bottom

Say I have the following CSS and HTML code: #header { height: 150px; } <div id="header"> &l

avatar
Wei
0 1 0 9
asked 07 September, 2021
54 votes
19 answers
1.8K views
What is the difference between visibility:hidden and display:none?

The CSS rules visibility:hidden and display:none both result in the element not being visible. Are these synon

avatar
Margo
0 1 0 9
asked 07 September, 2021
64 votes
19 answers
1.7K views
How do I combine a background-image and CSS3 gradient on the same element?

How do I use CSS3 gradients for my background-color and then apply a background-image to apply some sort of li

avatar
Jesenia
0 1 0 9
asked 07 September, 2021
56 votes
30 answers
640 views
Font scaling based on width of container

I'm having a hard time getting my head around font scaling. I currently have a website with a body font-

avatar
Elicia
0 1 0 9
asked 07 September, 2021
64 votes
30 answers
2.8K views
How can I vertically center a "div" element for all browsers using CSS?

I want to center a div vertically with CSS. I don't want tables or JavaScript, but only pure CSS. I found

avatar
Lawanda
0 1 0 9
asked 07 September, 2021
67 votes
23 answers
717 views
Is there a "previous sibling" selector?

The plus sign (+) is for selecting the next sibling. Is there an equivalent for the previous sibling?

avatar
Solomon
0 1 0 9
asked 07 September, 2021
46 votes
30 answers
3K views
How to vertically align an image inside a div

How can you align an image inside of a containing div? Example In my example, I need to vertically center the

avatar
Corey
0 1 0 9
asked 07 September, 2021
53 votes
7 answers
1.6K views
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

avatar
Kisha
0 1 0 9
asked 07 September, 2021
51 votes
30 answers
2.7K views
Transitions on the CSS display property

I'm currently designing a CSS 'mega dropdown' menu - basically a regular CSS-only dropdown menu

avatar
Dorinda
0 1 0 9
asked 07 September, 2021
55 votes
17 answers
1.6K views
Click through div to underlying elements

I have a div that has background:transparent, along with border. Underneath this div, I have more elements. C

css
avatar
Margo
0 1 0 9
asked 07 September, 2021
54 votes
22 answers
1.2K views
How do CSS triangles work?

There're plenty of different CSS shapes over at CSS Tricks - Shapes of CSS and I'm particularly puzz

avatar
Freida
0 1 0 9
asked 07 September, 2021
52 votes
24 answers
2.2K views
How to change the cursor into a hand when a user hovers over a list item?

I've got a list, and I have a click handler for its items: <ul> <li>foo</li> <l

css
avatar
Percy
0 1 0 9
asked 07 September, 2021
52 votes
15 answers
2.3K views
What&apos;s the difference between SCSS and Sass?

From what I've been reading, Sass is a language that makes CSS more powerful with variable and math suppo

avatar
Shantay
0 1 0 9
asked 07 September, 2021
55 votes
30 answers
1.3K views
How can I transition height: 0; to height: auto; using CSS?

I am trying to make a <ul> slide down using CSS transitions. The <ul> starts off at height: 0;. O

avatar
Yolando
0 1 0 9
asked 07 September, 2021
64 votes
30 answers
2K views
Is there a CSS parent selector?

How do I select the <li> element that is a direct parent of the anchor element? As an example, my CSS w

avatar
Clarice
0 1 0 9
asked 07 September, 2021
50 votes
30 answers
604 views
How to disable text selection highlighting

For anchors that act like buttons (for example Questions, Tags, Users, etc. which are located on the top of th

avatar
Corey
0 1 0 9
asked 07 September, 2021
52 votes
19 answers
2.7K views
What characters can be used for up/down triangle (arrow without stem) for display in HTML?

I'm looking for a HTML or ASCII character which is a triangle pointing up or down so that I can use it as

avatar
Kristopher
0 1 0 9
asked 07 September, 2021
55 votes
30 answers
823 views
How do I vertically align text in a div?

I am trying to find the most effective way to align text with a div. I have tried a few things and none seem t

avatar
Percy
0 1 0 9
asked 07 September, 2021
56 votes
30 answers
1.3K views
Hide scroll bar, but while still being able to scroll

I want to be able to scroll through the whole page, but without the scrollbar being shown. In Google Chrome i

avatar
Arline
0 1 0 9
asked 07 September, 2021