Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Insert × using CSS pseudo element

I am trying to use × &times HTML character as a close icon on a dialog link

.close:before {
    content: "\0274c";
    display: block;
    text-align: center;
    vertical-align: middle;
}

Firefox works with the example above and also using

content: "\274c";

Chrome wont accept either and simply gives me a missing character square. I am using Arial as the font. What do I need to do to make this cross browser compatible?

like image 540
R Reveley Avatar asked Aug 01 '14 13:08

R Reveley


People also ask

What is the synonym of insert?

Some common synonyms of insert are insinuate, intercalate, interject, interpolate, interpose, and introduce. While all these words mean "to put between or among others," insert implies putting into a fixed or open space between or among. inserted a clause in the contract.

Why do we use insert?

The insert command is used for inserting one or more rows into a database table with specified table column values. The first DML command executed immediately after a table creation is the insert statement.

What does insert mean in science?

Listen to pronunciation. (in-SER-shun) A type of genetic change that involves the addition of a segment of DNA. It may be as small as a single base but can vary significantly in size.

What is insert in Python?

insert() Function is a Python library function that is used to insert the given element at a particular index in a list. Syntax of the insert() function is, My_list.insert(index, element) insert() function takes 2 parameters, index and element. There is no return value in insert() function in Python.


2 Answers

The escape sequence you're using does not represent the × sign. It represents U+274C CROSS MARK, which is an entirely different symbol altogether (and one that happens to be represented in emoji as well).

The codepoint of ×, as mentioned in the comments, is U+00D7 MULTIPLICATION SIGN, which is what you are looking for. The difference in size boils down to how each character glyph is drawn in the typeface.

If a browser does not render U+274C (or any other given character for that matter), it may be an issue with either the font, or the browser, or even the platform.

like image 51
BoltClock Avatar answered Oct 19 '22 17:10

BoltClock


You could use other symbols:

  • U+2716 - HEAVY MULTIPLICATION
  • U+1F5D9 - CANCELLATION

For more options see: X mark

like image 1
Barnee Avatar answered Oct 19 '22 16:10

Barnee