1

I have made my theme and installed it on my host, but there is a problem with my body tag. it gets an automatic inline style which looks like below in Google Chrome:

<body style="">&#65279;&#65279;

And in Safari looks like this:

<body style="">

This causes my website show a blank space before my top menu. and It really bothers me. How can I get rid of this unwanted and automatically added inline style?

For more information, when I delete this styling using the inspect element section of my Browser(chrome or safari) that blank space disappears. but I don't know how to get rid of that style forever.

4
  • A style attribute shouldn't create blank space, so focusing on it is a red herring. It's more likely to be the &#65279;&#65279;, but right now it isn't possible to diagnose the cause based on what you've shown us, we'd need to see the code responsible for displaying those characters, it could even be a CSS issue
    – Tom J Nowell
    Commented Aug 14, 2017 at 11:52
  • @TomJNowell there is no code that can create those characters. Commented Aug 14, 2017 at 11:53
  • Something is generating them, but without seeing any code it's difficult to tell. What is the address of your site?
    – Tom J Nowell
    Commented Aug 14, 2017 at 12:15
  • @TomJNowell thanks for your attention, I just found the answer. Commented Aug 14, 2017 at 12:28

1 Answer 1

2

After searching a lot, I realized that elements inside my head tag are shown inside body tag and head tag contains nothing in my generated HTML code.

This happened because I had used UTF-8-BOM encoding and by changing it to simple UTF-8 everything was fixed.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.