Applying a button and centering it in the RocketTheme Affinity template

This took me a while to do so I thought I'd document it for future reference.

The Issue

See the restore default setting link at the bottom of this page in the footer?  I wanted to put one of the styled buttons behind it but then found that there's a lot more to do than just that.


  1. Open the templates/rt_affinity_j15/index.php
  2. Look at the last few lines with the original code (below)
  3. For this website template: 
    1. I've added the module-dark classes.
    2. Specified float:none to get rid of float:left
    3. Specified width of readon-wrap1 to the width of the button
    4. Specified margin:0 auto to center readon-wrap1


Original Code:

<?php if ($show_defaultsettings == "true") : ?>
	<a href="#" id="clear-cookies"><?php echo JText::_('DEFAULT_SETTINGS'); ?></a>
<?php endif; ?>
  1.  <?php if ($show_defaultsettings == "true") : ?> 
  2.      <a href="#" id="clear-cookies"><?php echo JText::_('DEFAULT_SETTINGS')?></a> 
  3.  <?php endif; ?> 


New Code:

<?php if ($show_defaultsettings == "true") : ?>
	<div style="overflow: hidden;float:none">
		<div class="module-dark readon-wrap1" style="float:none;width:200px;margin:0 auto">
			<div class="module-dark readon1-l"></div>
			<a href="#" id="clear-cookies" class="module-dark readon-main" style="margin-top:0px"><span class="module-dark readon1-m"><span class="module-dark readon1-r"><?php echo JText::_('DEFAULT_SETTINGS'); ?></span></span></a>
	<div class="clr"></div>		
<?php endif; ?>
  1.  <?php if ($show_defaultsettings == "true") : ?> 
  2.      <div style="overflow: hidden;float:none"> 
  3.          <div class="module-dark readon-wrap1" style="float:none;width:200px;margin:0 auto"> 
  4.              <div class="module-dark readon1-l"></div> 
  5.              <a href="#" id="clear-cookies" class="module-dark readon-main" style="margin-top:0px"><span class="module-dark readon1-m"><span class="module-dark readon1-r"><?php echo JText::_('DEFAULT_SETTINGS')?></span></span></a> 
  6.          </div> 
  7.      </div> 
  8.      <div class="clr"></div> 
  9.  <?php endif; ?> 


Category: Joomla :: Article: 171

Credit where Credit is Due:

Feel free to copy, redistribute and share this information. All that we ask is that you attribute credit and possibly even a link back to this website as it really helps in our search engine rankings.

Disclaimer: The information on this website is provided without warranty and any content is merely the opinion of the author. Please try to test in development environments prior to adapting them to your production environments. The articles are written in good faith and, at the time of print, are working examples used in a commercial setting.

Thank you for visiting and, as always, we hope this website was of some use to you!

Kind Regards,

Joel Lipman

Related Articles

Joes Revolver Map

Joes Word Cloud


Badge - Certified Zoho Creator Associate
Badge - Certified Zoho Creator Associate

Donate & Support

If you like my content, and would like to support this sharing site, feel free to donate using a method below:

Donate to Joel Lipman via PayPal

Donate to Joel Lipman with Bitcoin - Valid till 8 May 2022 bc1qjtp4l4ra452wzvuk9a45yfj82zkahsyy2z379y
© 2022 Joel Lipman .com. All Rights Reserved.