Li: before {content: "■"; } How to encode this special character as Bullit in a mailbox?

After proudly color my liststyle pool without any graphic urls or span tags , via:

ul{ list-style: none; padding:0; margin:0; } li{ padding-left: 1em; text-indent: -1em; } li:before { content: "■"; padding-right:7px; } 

Despite the fact that these stylesheets work fine with rounded borders and other css3 elements, and although the recipient of the email (for example, Eudora OSE 1) correctly displays all CSS styles, as in the browser, there is one problem: bullets like or turn into &#adabacadabra;

Finally, it appears in the letters:

enter image description here

How can I come from here?

+55
list css special-characters character-encoding
Mar 15 '11 at 18:53
source share
6 answers

I have never encountered this problem before (I didn’t work much on email, I avoid it like a plague), but you can try declaring a bullet with a Unicode code point (different notation for CSS than for HTML): content: '\2022' . (you need to use a hexadecimal number, not 8226 decimal)

Then, if you use something that matches these characters and HTML encodes them in essence (which won't work for CSS strings), I assume that it will ignore it.

+112
Mar 16 2018-11-11T00:
source share

You can try:

 ul { list-style: none;} li { position: relative;} li:before { position: absolute; top: 8px; margin: 8px 0 0 -12px; vertical-align: middle; display: inline-block; width: 4px; height: 4px; background: #ccc; content: ""; } 

It worked for me thanks to this post.

+6
Dec 11 '12 at 19:48
source share

You are faced with the problem of dual coding.

and • absolutely equivalent to each other. Both refer to the Unicode character "BULLET" (U + 2022) and can exist side by side in the HTML source code.

However, if this source code is again encoded with HTML at some point, it will contain and • . The first of them remains unchanged, the last is issued as "& # 8226;" on the screen.

This is the correct behavior in these conditions. You need to find the point at which the redundant second HTML coding occurs and get rid of it.

+5
Mar 15 '11 at 19:04
source share

Lea Converter is no longer available. I just used this converter

Steps:

  • Enter the decimal version of Unicode, for example 8226, in the input field of the green tool.
  • Click Dec code points
  • See the result in the Unicode U+hex notation field Unicode U+hex notation (e.g. U + 2022)
  • Use it in your CSS. For example content: '\2022'

ps. I do not have a link to the website.

+1
Jan 01 '14 at 7:40
source share

You should not use LI in email. They are unpredictable for email clients. Instead, you should encode each marker point as follows:

 <table width="100%" cellspacing="0" border="0" cellpadding="0"> <tr> <td align="left" valign="top" width="10" style="font-family:Arial, Helvetica, Sans-Serif; font-size:12px;">&bull;</td> <td align="left" valign="top" style="font-family:Arial, Helvetica, Sans-Serif; font-size:12px;">This is the first bullet point</td> </tr> <tr> <td align="left" valign="top" width="10" style="font-family:Arial, Helvetica, Sans-Serif; font-size:12px;">&bull;</td> <td align="left" valign="top" style="font-family:Arial, Helvetica, Sans-Serif; font-size:12px;">This is the second bullet point</td> </tr> </table> 

This ensures that your bullets work in every mail client.

0
Mar 06 '14 at 8:38
source share

This site may be useful.

 http://character-code.com 

here you can copy it and put it directly on css html

0
Jun 23 '15 at
source share



All Articles