WordPress.org

Ready to get started?Download WordPress

Forums

Align two short code items side by side (5 posts)

  1. wrylilt
    Member
    Posted 3 years ago #

    I'm trying to align two items that use shortcodes side by side (a contact form and a google map on a contact page). I've tried paragraph align left and right and putting them side by side but one always sits above the other, making the right side look bare and blank.

    Any idea how to get the two short code items side by side? Thanks

  2. hedronist
    Member
    Posted 3 years ago #

    You've run into a fundamental bug in the shortcode parsing code. You could try to deal with this by using float:left and float:right on associated classes of the shortcode-generated items, but this is (at best) a hack. Someday this will be fixed in the core code ... but don't hold your breath.

  3. wrylilt
    Member
    Posted 3 years ago #

    Sorry but... what do you mean in the associated classes of the shortcode generated items? In the related plugin itself?

  4. hedronist
    Member
    Posted 3 years ago #

    It's generally a bad idea to hack code you are not maintaining yourself, because that means that you now get to be the maintainer.

    Look at the the HTML source of the generated page and see what CSS classes and/or ids are being used for the elements that were emitted by the shortcodes. Then in your style.css file add rules to modify these specific elements.

  5. wrylilt
    Member
    Posted 3 years ago #

    Ok thank you. Will give it a try anyway, and make sure I have a backup! :-)

Topic Closed

This topic has been closed to new replies.

About this Topic