Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Any way to remove italic style from content inserted using :before class?

Tags:

html

css

I have code like so

<li class="iconic camera">Pentax K-5 16 Megapixel DSLR</li>

I use CSS like

.iconic.camera:before {
font-size: 35px;
font-family: "KameraDings";
content: "A";
padding-right: 8px;
vertical-align: -10%;
}

to insert a Camera symbol with the special symbol font. However I have style for li's set to italic. Is there a way possible to remove italic from this one content letter ? I have tried font-style: none; to no avail

like image 380
devcoder Avatar asked Jul 16 '12 20:07

devcoder


People also ask

How do I get rid of italics in CSS?

Use font-style to reset the italic style when the class is used.

How do you change italic to normal text?

Click the arrow beside Format and then select Font. In the Font Style area, click No Italic. Click OK.

How do you stop italics in HTML?

Then type the tag </i> where you want the italics to stop.

How do I stop italics?

You can avoid that issue by typing the text, and then applying formatting after the fact. turn off italics by holding down 'CTRL and I' at the same time .


1 Answers

That's font-style: normal; not font-style: none;.

like image 112
Madara's Ghost Avatar answered Oct 24 '22 07:10

Madara's Ghost