Linked Questions

1142 votes
11 answers
518k views

How do you use the CSS content property to add HTML entities? Using something like this just prints   to the screen instead of the non-breaking space: .breadcrumbs a:before { content: '&...
nickf's user avatar
  • 548k
46 votes
2 answers
112k views

I am trying to add a HTML special character using its code. It's working fine when I use it inside my div, but how can I do this using CSS. I have tried as following. .right-arrow:after { ...
Jay Shukla's user avatar
  • 5,836
550 votes
16 answers
951k views

Imagine a simple unsorted list with some <li> items. Now, I have defined the bullets to be square shaped via list-style:square; However, if I set the color of the <li> items with color: #...
Sam's user avatar
  • 15.6k
81 votes
16 answers
239k views

I'm using (the excellent) Font-Awesome in my site, and it's working fine, if I use it this way: <i class="icon-home"></i> But (for some reasons) I want to use it in the Unicode way, like: ...
matan129's user avatar
  • 1,717
94 votes
6 answers
146k views

I am using Font Awesome on my webpage and I want to display an icon inside the :before pseudo element. According to the documentation/cheatsheet, I have to type &#xf066; to get this font, but it ...
Sven's user avatar
  • 13.3k
80 votes
8 answers
132k views

Is there any way to embed HTML in the css content: element when using a :before pseudo-element? I want to use a Font Awesome (or Glyphicon) in a use case like this: h1:before { content: "...
tig's user avatar
  • 3,473
14 votes
7 answers
68k views

I would like to display emojis on my webpage in a react chat app. The plan is to give the user a list of emojis to select from. How do I use the codes like '1F683' and have them display the emoji on ...
BeesNees's user avatar
  • 251
9 votes
2 answers
9k views

I'm trying to add icons to my navigation (which dynamically changes) via JavaScript. Here is my code (or JSFiddle): var icon = document.querySelector('#icon'); icon.setAttribute('data-icon', '...
venkatraj's user avatar
  • 101
2 votes
2 answers
6k views

On a website I saw some interesting elements and inspected them. This is how the element looked like: The CSS definition: .entry-meta .date a:before { content: "\f303"; } I know images can be ...
Sceptical Jule's user avatar
5 votes
3 answers
2k views

How do you implement an icon font? Github uses them extensively on their webpage, yet trying to reproduce their implementation results in failure. https://github.com/styleguide/css/7.0 See the ...
spuder's user avatar
  • 18.6k
6 votes
1 answer
321 views

http://www.wordherd.co/#features On this site, when I try to look at the source image file of any of the icons (like "Directions") using Firebug, it displays some sort of unicode for the content. ...
platypus's user avatar
  • 1,205
7 votes
1 answer
2k views

I'm using the :after pseudo-element to add a character beside each item in a list. The CSS I'm currently using is: li:after { display: inline-block; content: '\25b6'; color: #dc313a;...
David's user avatar
  • 3,773
0 votes
1 answer
1k views

Good day, I've setup a WordPress website and selected a theme (Metrolo) plus WooCommerce. The menu items should have a down arrow (\f0d7) I think this is set by the theme. The arrow is not showing, ...
TungstenX's user avatar
  • 900
2 votes
1 answer
1k views

HTML5 Select element CSS3 style (no javascript) is shown below: Listing 1. Select element CSS3 style (no javascript): select { border : 1px solid #e9e9e9; width ...
Alexander Bell's user avatar
1 vote
3 answers
45 views

I hope you can help me. I was trying to hover an image with "add to cart" like here: https://spacewallet.de/shop I dont know, what I am doing wrong here, can you help? .hunderter { ...
Krystian's user avatar
  • 997

15 30 50 per page