Support » Fixing WordPress » Div instead of paragraph

  • Resolved iansdell

    (@iansdell)


    When I write a fresh post in a new WordPress installation, WP is marking its paragraphs div-/div instead of p-/p.

    This is throwing the page structure out. I haven’t come across this in any other WP installation I run.

    I’ve modified templates, but can’t find what might have caused this glitch, and would be grateful for advice.

Viewing 15 replies - 1 through 15 (of 17 total)
  • Are you using the wysiwyg editor? Are copying from some kind of word processor?

    Pasting text from elsewhere seems to be ok. The problem’s happening when I type directly into the wysiwyg editor.

    Oops … just tried pasting text which had been stripped of formatting and it’s happened again. So both scenarios apply.

    Check/deactivate plugins?

    Sidebar widgets is the only active plugin. Tried disabling it, but still the div tag appears insteas of p.

    Does the same thing with unmodified templates?

    Rather than tweak customisations I’ve tried a fresh WP installation using the WordPress Default 1.5 theme. Same thing happens … typing text into the wysiwyg ‘Write Post’ box yields a div markup instead of p.

    Am now wondering if this is a glitch in WP 2.0.3?

    Or is there somewhere in a template where I can specify which tag I want?

    1) Not that I’ve heard of
    2) No, it’s not theme-related

    So if you were to type:

    Hi, this is a line of text.

    And this is another line of text!

    The results, after saving/publishing would be (if you view source or look at it with the HTML button):

    <div>Hi, this is a line of text.</div>

    <div>And this is another line of text!</div>

    Is that right?

    Absolutely. Have tried again on a clean install (of WordPress 2.0.3 using Fantastico, which has worked fine on other domains).

    Typing direct or pasting both end up with div instead of p as you describe.

    Here’s how it manifests:
    http://glasgow-southsiders.co.uk/demo/

    (In IE headers, footers and sidebar are displaced; same in Firefox and Opera, plus background graphic disappears.)

    And you haven’t modified any templates or anything? The site you’ve provided has all kinds of problems with it, probably mostly due to those DIVs instead of Ps. I do notice that the “Hello World!” entry has P tags properly in place. What’s the difference between that entry and any of the other 2 you created?

    This looks like a problem with the way the loop is called on your pages, an extra DIV or two appears with each entry (each entry begins with <div> and ends with </div></div>. Those 2 closing DIVs are killing the site.

    Exactly. Perfect description of the problem I’m trying to nail.

    I reiterate that this is a fresh installation; the only way I’ve touched it is to paste the body of one post and type a second.

    (The ‘Hello World’ entry comes with the installation.)

    I’d like to know why both the RTE and Plain text editor place tags around text, rather than the
    that I place…. in the posts, the way they’re used, aren’t XHTML compliant, whereas
    is.

    You may not believe this: turns out that when using Firefox, IE6, or IE6 with the Maxthon front end, a ‘p’ markup is given at the start of paragraphs, whether typed or pasted.

    However, paragraphs are given a ‘div’ in IE6 with the Avant Browser front end, which is what I’ve been using.

    So it looks as if the problem is with Avant Browser. Don’t know how, but at least I have a way forward.

    (Also interesting that *no* markup seems to appear at the start of paragraphs when using Opera! This might help Brandon206.)

    Thanks to Yosemite and Moshu for your help.

    Can you mark this “Resolved”? Thanks.

    No probs.

Viewing 15 replies - 1 through 15 (of 17 total)
  • The topic ‘Div instead of paragraph’ is closed to new replies.