VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: kelecz on June 14, 2014, 01:29:58 AM

Title: Social Share inline with Ask about product!
Post by: kelecz on June 14, 2014, 01:29:58 AM
Hello,

please help me about this. i want to put it in same line:


?>
<?php $modules =& JModuleHelper::getModules('social');
    foreach (
$modules as $module) {
echo "<div>";
echo JModuleHelper::renderModule($module);
echo "</div>";
?>

<?php
// Ask a question about this product
if (VmConfig::get('ask_question'0) == 1) {
    
?>

    <div class="ask-a-question">
        <a class="ask-a-question" href="<?php echo $this->askquestion_url ?>" rel="nofollow" style="display:inline"; ><?php echo JText::_('COM_VIRTUEMART_PRODUCT_ENQUIRY_LBL'?></a>
        <!--<a class="ask-a-question modal" rel="{handler: 'iframe', size: {x: 700, y: 550}}" href="<?php echo $this->askquestion_url ?>"><?php echo JText::_('COM_VIRTUEMART_PRODUCT_ENQUIRY_LBL'?></a>-->
        </div>
<?php }
?>



(//)

Thx in advance!

[attachment cleanup by admin]
Title: Re: Social Share inline with Ask about product!
Post by: GJC Web Design on June 14, 2014, 01:39:16 AM
standard html techniques

surround both elements in a div  - give it a width that fits both

float one left and the other right
Title: Re: Social Share inline with Ask about product!
Post by: kelecz on June 14, 2014, 02:27:49 AM
Quote from: GJC Web Design on June 14, 2014, 01:39:16 AM
standard html techniques

surround both elements in a div  - give it a width that fits both

float one left and the other right

Can you please show me how on that example. I really do not know.

Thank you.
Title: Re: Social Share inline with Ask about product!
Post by: GJC Web Design on June 14, 2014, 16:58:06 PM
come on - Google this and u will find it - this isn't really a html 101 forum!


<div class="holder">
  <div class="leftme">
    Share stuff
  </div>
  <div class="rightme">
    Ask stuff
  </div>

</div>


css

.holder{width:100%;}
.leftme{float:left;width:50%;}
.rightme{float:right;width:50%;}


Title: Re: Social Share inline with Ask about product!
Post by: kelecz on June 14, 2014, 22:59:13 PM
Thank you
Title: Re: Social Share inline with Ask about product!
Post by: kelecz on June 18, 2014, 10:25:42 AM
Default file:

?>
   <?php $modules =& JModuleHelper::getModules('social');
    foreach ($modules as $module) {
   echo "<div>";
   echo JModuleHelper::renderModule($module);
   echo "</div>";
} ?>   
   
   
   <?php
// Ask a question about this product
if (VmConfig::get('ask_question', 0) == 1) {
    ?>         
         <div class="ask-a-question">
              <a class="ask-a-question" href="<?php echo $this->askquestion_url ?>" rel="nofollow" style="display:inline"; ><?php echo JText::_('COM_VIRTUEMART_PRODUCT_ENQUIRY_LBL') ?></a>
              <!--<a class="ask-a-question modal" rel="{handler: 'iframe', size: {x: 700, y: 550}}" href="<?php echo $this->askquestion_url ?>"><?php echo JText::_('COM_VIRTUEMART_PRODUCT_ENQUIRY_LBL') ?></a>-->
              </div>
      <?php }
      ?>
   
   </div>
   </div>

CSS:

/*Social*/

.nsb_container {
  float: right;
margin-right: -30px !important;display:inline;
margin-top: 5px;clear:both;
  content:".";
  display:block;
  height:0;
  line-height:0;
}


I did it this way and works. Hope somebody can use it.





[attachment cleanup by admin]