• Resolved jbt103

    (@jbt103)


    So I really like this plugin but it’s pushing my sidebar to the bottom. I have no idea what I’m doing wrong. The post I’m experimenting on is here.

    The custom plugin css is this:

    /* The container for the plugin */
    .gmc-recipe {
      overflow: hidden;
      padding: 10px;
      position: relative;
    }
    
    .entry-content .gmc-recipe table {
      width: 100%;
      font-size: inherit;
      color: inherit;
    }
    
    .entry-content .gmc-recipe table td {
      border: 0;
    }
    
    h2.gmc-recipe-title {
      float: left;
      width: inherit;
      vertical-align: top;
      margin-top: 0 !important;
      padding-top: 0 !important;
      max-width: 80%;
      display:none;
    }
    
    a.gmc-print-options {
      float: right;
      font-size: 0.8em;
      text-align: right;
      display:none;
      /*width: 85px */
      /* If the printer icon is not on the same line as the */
      /* words "print recipe" then uncomment this */
    }
    
    .gmc-clear-both {
      clear: both;
    }
    
    .gmc-recipe-main-photo {
      display: inline;
      float: left;
      margin-bottom: 10px;
    }
    .gmc-recipe-main-photo img {
      height: auto;
      width: auto;
    }
    
    /*The information next to the main photo */
    .entry-content table.gmc-recipe-summary, .entry-content table.gmc-recipe-summary-narrow {
      border: 0;
      border-spacing: 0;
      float: right;
      padding: 0 0 10px 0;
      margin: 0;
    }
    
    .entry-content table.gmc-recipe-summary {
      width: 250px;
      font-size: 0.8em;
    }
    
    .entry-content table.gmc-recipe-summary-narrow {
      clear: left;
      float: left;
      width: auto;
    }
    
    .entry-content .gmc-recipe-summary td, .entry-content .gmc-recipe-summary-narrow td {
      border: 0;
      padding-top: 0;
      padding-bottom: 2px;
    }
    
    td.gmc-heading, td.gmc-heading-narrow {
      font-weight: bold;
      padding-right: 10px;
      text-align: right;
      vertical-align: text-top;
      /* If "total time" shows on 2 lines, increase the width */
    }
    
    td.gmc-heading {
      width: 70px;
    }
    
    .no-main-photo td:first-child {
      width: inherit;
    }
    
    .gmc-recipe-description {
     	float:left;
      	width:250px;
      	margin-left:20px;
      	margin-bottom:10px;
      	font-size:16px
    }
    
    .gmc-recipe-ingredients {
      clear: both;
    }
    
    ul.gmc-ingredient-list {
      clear: left;
    }
    
    table.gmc-step-list {
      margin: 0;
      padding: 0;
    }
    
    .gmc-recipe-steps h2 {
      clear: both;
    }
    
    .entry-content table.gmc-step-list, .gmc-step-list-item td, td.gmc-step-list-title, td.gmc-group-list-title, td.gmc-step-list-title-wide {
      border: none;
    }
    
    td.gmc-group-list-title {
      font-weight: bold;
      padding: 0;
    }
    
    .gmc-group-list-title-wide {
      font-weight: bold;
      width: 12%;
    }
    
    .entry-content td.gmc-step-list-title {
      font-weight: bold;
      padding: 0;
    }
    
    .gmc-step-list-title-wide {
      font-weight: bold;
      width: 12%;
    }
    
    .gmc-step-list-item td {
      padding-bottom: 10px;
      padding-top: 0;
      vertical-align: top;
      text-align: inherit;
    }
    
    img.gmc-step-photo {
      width: 150px;
      height: auto;
      max-width: inherit !important;
      padding-top: 5px;
    }
    
    .gmc-img-right {
      float: right;
    }
    
    .gmc-powered-by {
      font-size: 0.7em;
      text-align: right;
    }
    
    table.no-main-photo {
      float: left;
      width: inherit;
      font-size: inherit;
    }
    
    .gmc-web-hidden {
      display: none;
    }
    
    ul.gmc-print-options-box, ul.gmc-print-options-box li {
      padding: 0;
      margin: 0;
      list-style: none;
      display:none;
    }
    
    .gmc-print-area {
      position: absolute;
      right: 5px;
      top: 10px;
    }
    
    .gmc-print-area img {
      padding: 0 5px 0 0;
      margin: 0;
      border: none;
      vertical-align: text-bottom;
    }
    
    ul.gmc-print-options-box {
      clear: both;
      margin: 0;
      padding: 5px 5px 0;
      float: right;
      border: solid 1px black;
      clear: both;
      position: relative;
      background-color: white;
      display:none;
    }
    
    .gmc-print-options-box li a {
      color: #555555;
      font-weight: bold;
      display: block;
      padding: 4px;
      text-decoration: none;
      display:none;
    }
    
    .gmc-print-options-box li a:hover {
      color: #999999;
    }
    
    ul.gmc_no_list_item {
      list-style: none;
      margin-left: 0;
    }
    
    .gmc_list_title {
      vertical-align: middle;
    }
    
    table.gmc_recipe_list, table.gmc_recipe_list td {
      border: none;
    }
    
    table.gmc_recipe_list td {
      vertical-align: middle;
    }
    
    table.gmc_recipe_list img {
      text-align: right;
      padding-left: 10px;
      padding-right: 10px;
    }
    
    .gmc-nutrition-summary, .gmc-nutrition-advanced {
      clear: both;
    }
    
    .gmc-nutrition-summary td, .gmc-nutrition-summary th {
      border: 0;
    }
    
    .gmc-nutrition-summary th, .gmc-nutrition-summary td, .gmc-nutrition-advanced th, td.gmc_per_serving, td.gmc_100g, td.gmc_gda {
      text-align: center;
    }
    
    .gmc-nutrition-summary th {
      font-weight: bold;
    }
    
    td.gmc-nutrition-serving {
      text-align: left;
    }
    
    span.gmc-nutrition-serving {
      font-weight: bold;
    }
    
    @media print {
      font-family: "Times New Roman", "MS Georgia", serif;
      font-size: 12pt;
      tr, img {
        page-break-inside: avoid;
      }
    
      .gmc-print-hidden, ul.gmc-print-options-box {
        display: none !important;
      }
    
      .gmc-web-hidden {
        display: block !important;
      }
    }

    It was fine and then it started pushing the sidebar down to the bottom, it’s only with this plugin and nothing else (pages, posts, etc).

    https://www.ads-software.com/extend/plugins/getmecooking-recipe-template/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter jbt103

    (@jbt103)

    By the way, if anyone else has this same problem, there is an incorrect <div> element in the recipe-template-shortcode.php file.

    Look for this bit towards the bottom:
    </div> <?php if (!empty($post->post_content) && get_option('gmc-note-position') == '1') { ?>

    and change it to:

    <div>       <?php if (!empty($post->post_content) && get_option('gmc-note-position') == '1') { ?>

    Basically just did a search of “div” on that page and made sure they all had an open and closing div, there should be equal numbers of openings and closings so just do a search and count.

    Plugin Author GetMeCooking

    (@getmecooking)

    Hi jbt103,

    Glad you got it fixed.

    I just checked that file and the div tags all match up correctly. Maybe depending on the if statements one of the closing/opening tags isn’t being rendered when it should. I’ll take a look!

    Thanks,
    Kevin

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Sidebar pushed to the bottom’ is closed to new replies.