• josephlarrew

    (@josephlarrew)


    I’m using the GoDaddy Mark I theme and whenever I add an anchor tag, it automatically breaks the line. I want to have my two image links right beside each other. I tried editing the CSS like this:

    a {
    display: inline !important;
    white-space: nowrap;
    }

    But I’m not getting anything changing. Here is the website. Nothing seems to work. Any help would be appreciated.

    Thanks,
    Joseph

Viewing 5 replies - 1 through 5 (of 5 total)
  • martcol

    (@hotmale)

    img.alignnone {
    display: inline;
    }

    Try that, but there’s also a <br> element between the two images that should be removed.

    Note too, that it will affect any image, anywhere with the class alignnone.

    Thread Starter josephlarrew

    (@josephlarrew)

    Yeah, the <br> element is there when you look at the html of the page by pressing Ctrl+U, but it isn’t there in the code of my page. Below is my code:

    Below are the links to sites that I have developed and/or maintain!
    &nbsp;
    <a href="https://www.phrd.com"><img class="alignnone wp-image-53 size-full" src="https://www.freedomwebdevelopment.com/wp-content/uploads/2015/02/logo_phrd.jpg" alt="logo_phrd" /></a>
    <a href="https://www.traveljoans.com"><img class="alignnone wp-image-54 size-full" src="https://www.freedomwebdevelopment.com/wp-content/uploads/2015/02/TravelJoansBanner.jpg" alt="TravelJoansBanner" /></a>
    Rajesh Soni

    (@rajeshsoni)

    Change this…

    Below are the links to sites that I have developed and/or maintain!
    ?
    <a href="https://www.phrd.com"><img class="alignnone wp-image-53 size-full" src="https://www.freedomwebdevelopment.com/wp-content/uploads/2015/02/logo_phrd.jpg" alt="logo_phrd" /></a>
    <a href="https://www.traveljoans.com"><img class="alignnone wp-image-54 size-full" src="https://www.freedomwebdevelopment.com/wp-content/uploads/2015/02/TravelJoansBanner.jpg" alt="TravelJoansBanner" /></a>

    to…

    Below are the links to sites that I have developed and/or maintain!
    ?
    <a href="https://www.phrd.com"><img class="alignnone wp-image-53 size-full" src="https://www.freedomwebdevelopment.com/wp-content/uploads/2015/02/logo_phrd.jpg" alt="logo_phrd" /></a> <a href="https://www.traveljoans.com"><img class="alignnone wp-image-54 size-full" src="https://www.freedomwebdevelopment.com/wp-content/uploads/2015/02/TravelJoansBanner.jpg" alt="TravelJoansBanner" /></a>

    When you’re adding the <img> links, just make sure to have them on the same line in the WP editor.
    If you enter those <img> in new lines, WordPress will replace the new lines to

    a {
    display: inline !important;
    white-space: nowrap;
    }

    That CSS hack is not required if you take care of the above.

    Thread Starter josephlarrew

    (@josephlarrew)

    Yeah, that did it. That’s kind of annoying. Is there a way I can turn that off. Thanks for your help!

    Rajesh Soni

    (@rajeshsoni)

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Anchor tag automatically add line break’ is closed to new replies.