• Hi all,

    I’ve just coded (CSS and HTML) some simple lists but when I paste these into WordPress text editor and save, it turns my code into a complete mess.

    Is there a way to enter code and have it be output how it should?

    Thanks,
    Lou

Viewing 11 replies - 1 through 11 (of 11 total)
  • it turns my code into a complete mess

    Can you elaborate?

    Thread Starter Lou Sparx

    (@roulettered)

    If I have:

    <div>
    <p>

    it will turn it to:

    <div></ br>
    <p></ br>

    Which editor are you using?.

    Thread Starter Lou Sparx

    (@roulettered)

    Both

    No. Never switch editing tabs. Pick a tab and stick to it for the life of that Post or Page.

    Thread Starter Lou Sparx

    (@roulettered)

    I’ve tried both. Both mess up the code. Can you offer any help to the problem?

    Thread Starter Lou Sparx

    (@roulettered)

    Surely it can’t just be me that WordPress adds </ br> tags to.

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    One of the tabs is meant for plain text and formatting that, so when you press enter, it adds a <br /> element (behind the scenes).

    The other tab is for the behind the scenes code, so that’s where you should be putting your HTML.

    Thread Starter Lou Sparx

    (@roulettered)

    Guys I understand the difference between editors. I’m using the text editor, not visual. Although I’ve tried visual.

    Are you, at any point, switching between editing tabs? Are you pasting content in the the Text tab from elsewhere? Can you replicate the problem using the default theme with all plugins deactivated?

    Thread Starter Lou Sparx

    (@roulettered)

    No. I wouldn’t dare switch between editors as we all know WordPress hates that. Before I try to replicate.. should/will WordPress output html/css exactly how it is written in the text editor or will it always add it’s own code?

Viewing 11 replies - 1 through 11 (of 11 total)

The topic ‘WordPress editor changing my CSS’ is closed to new replies.