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: Please note that the information provided on this website is intended for informational purposes only and does not represent a warranty. The opinions expressed are those of the author only. We recommend testing any solutions in a development environment before implementing them in production. The articles are based on our good faith efforts and were current at the time of writing, reflecting our practical experience 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 bc1qf6elrdxc968h0k673l2djc9wrpazhqtxw8qqp4

Donate to Joel Lipman with Ethereum 0xb038962F3809b425D661EF5D22294Cf45E02FebF
© 2024 Joel Lipman .com. All Rights Reserved.