• This is a repost and for that I apologize. It’s not a huge issue, but I was just seeing if anyone here could figure out an alternative to my solution. When I insert the following code into a page (visual editor disabled):

    /* Correct code snippet
    ---------------------------*/
    <div id="contactright">
    <img alt="image.jpg" src="image.jpg" height="133" width="200">
    
    <b>T:</b> Phone Number
    
    <img alt="image2.jpg" src="image2.jpg" height="133" width="200">
    
    <b>T:</b> Phone Number

    It adds an additional random <p> to my img tag when I create the page.

    It will do something like this :

    /* incorrect code snippet
    ---------------------------*/
    <div id="contactright">
    <img alt="image.jpg" src="image.jpg" height="133" width="200">
    
    <b>T:</b> Phone Number
    
    <img alt="image2.jpg" src="image2.jpg" height="133" width="200">
    
    <b>T:</b> Phone Number

    I can get it to work by putting the code like :

    /* alternative code snippet
    ---------------------------*/
    <div id="contactright">
    <img alt="image.jpg" src="image.jpg" height="133" width="200">
    <p>
    <b>T:</b> Phone Number
    </p>
    <div id="blank">
    <img alt="image2.jpg" src="image2.jpg" height="133" width="200">
    <p>
    <b>T:</b> Phone Number
    </p>

    but that looks sloppy :/. I’m Trying to see if there is another way to fixing this other than tricking it by putting a <div id=”blank”> before image2 starts. It looks like word press wants a <p> to start after a </p> unless the <p> is followed by a <div> or another value.

Viewing 1 replies (of 1 total)
  • Thread Starter aeonex

    (@aeonex)

    Incorrect code snippet isn’t actually showing the problem. That entire post was typed wrong :/ .

    Since I can’t edit the thread starter the code snippets need to be changed to:

    /* input
    ---------------------------*/
    <div id="contactright">
    <img alt="image.jpg" src="image.jpg" height="133" width="200">
    <p>
    <b>T:</b> Phone Number
    </p>
    <img alt="image2.jpg" src="image2.jpg" height="133" width="200">
    <p>
    <b>T:</b> Phone Number
    </p>
    /* output
    ---------------------------*/
    <div id="contactright">
    <img alt="image.jpg" src="image.jpg" height="133" width="200">
    <p>
    <b>T:</b> Phone Number
    </p>
    <p>
    <img alt="image2.jpg" src="image2.jpg" height="133" width="200">
    </p>
    <p>
    <b>T:</b> Phone Number
    </p>
Viewing 1 replies (of 1 total)

The topic ‘Code Edit Changing Code’ is closed to new replies.