0

I want to add a label last updated in front of the date.

My website structure is as follows:

<div class="meta">
"2022/3/24 /" <- this is (#text)
<span class="category-link">
<a href="example.com">category</a>
</span>
</div>

However, the class cannot be selected with #text for the date, so i used following method.

meta::before{
content: "최종업데이트:"; <- this is Last updated as Korean
}

The language of my homepage is Korean, and this method works fine.

But there is a problem that Koreans put in this way are often displayed as unknown characters like below.

"최종 ì—…ë °ì ´íŠ¸ :"

But when I refresh the browser, it is displayed normally.

If anyone knows how to solve this problem or put label in other way than please let me know

Thank you.

cheonmu
  • 61
  • 7
  • 1
    Typically this is due to a mismatch between encodings between the HTML and the CSS. Make sure all of you files are saved in, and served in, the same encoding. – Heretic Monkey Mar 24 '22 at 12:40
  • Hi, @HereticMonkey I am saving style.css file as UTF-8 and I put in header in html, but it doesn't solve the problem. Is there anything else I should check other than this? – cheonmu Mar 24 '22 at 12:57
  • It sounds as though the content is being rendered before your Korean font is fully loaded, and then not rerendered. I have no means of testing this at the moment but does the more recent suggestion given in https://stackoverflow.com/questions/4712242/wait-for-fonts-to-load-before-rendering-web-page help? Ie using a rel attribute with value preload in your link? – A Haworth Mar 24 '22 at 14:10

0 Answers0