Layout slides down when I change encoding

Discussion in 'CSS' started by ademmeda, May 7, 2011.

  1. #1
    Hi,

    I am designing a website using HTML-CSS-PHP and I have a strange problem. I am working locally on my PC and I use Notepad++ for coding and saving my files. The default encoding in Notepad++ is ANSI. I am using a language other than English for the text of the site, so I need to save the .php files in UTF-8 encoding. But when I change from ANSI to UTF-8 the layout slides down about 10 px, I have no idea why.
     
    ademmeda, May 7, 2011 IP
  2. Cash Nebula

    Cash Nebula Peon

    Messages:
    1,197
    Likes Received:
    67
    Best Answers:
    0
    Trophy Points:
    0
    #2
    It's probably due to some extra character added during conversion, like a byte order mark (BOM).
    Go to the View menu in Notepad++ and check "Show all characters".
    Delete any extra characters at the top, but not the carriage return or line feeds (CLFL).

    Also, do you have this in you head section?
     
    Cash Nebula, May 10, 2011 IP
  3. ademmeda

    ademmeda Active Member

    Messages:
    354
    Likes Received:
    3
    Best Answers:
    3
    Trophy Points:
    70
    #3
    Yes, it was the reason. I didn't see that "dot" in Notepad++, but when I uploaded to the server, it was visible.

    Thanks.
     
    ademmeda, May 12, 2011 IP