WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Div instead of paragraph (18 posts)

  1. iansdell
    Member
    Posted 7 years ago #

    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.

  2. moshu
    Member
    Posted 7 years ago #

    Are you using the wysiwyg editor? Are copying from some kind of word processor?

  3. iansdell
    Member
    Posted 7 years ago #

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

  4. iansdell
    Member
    Posted 7 years ago #

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

  5. yosemite
    Member
    Posted 7 years ago #

    Check/deactivate plugins?

  6. iansdell
    Member
    Posted 7 years ago #

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

  7. yosemite
    Member
    Posted 7 years ago #

    Does the same thing with unmodified templates?

  8. iansdell
    Member
    Posted 7 years ago #

    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?

  9. yosemite
    Member
    Posted 7 years ago #

    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?

  10. iansdell
    Member
    Posted 7 years ago #

    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.)

  11. tsguitar
    Member
    Posted 7 years ago #

    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.

  12. iansdell
    Member
    Posted 7 years ago #

    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.)

  13. brandon206
    Member
    Posted 7 years ago #

    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.

  14. iansdell
    Member
    Posted 7 years ago #

    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.

  15. tsguitar
    Member
    Posted 7 years ago #

    Can you mark this "Resolved"? Thanks.

  16. iansdell
    Member
    Posted 7 years ago #

    No probs.

  17. yosemite
    Member
    Posted 7 years ago #

    Welcome, and congratulations on finding it.

  18. brandon206
    Member
    Posted 7 years ago #

    hmmm Opera looks similar to FireFox... I may have to give that a try. I believe I've only come across this issue while @ work, when I'm on IE6, but at home I only use FF.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags