Center Module Content

Everything to do with Joomla! 1.5 templates and templating.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Locked
landon0000
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Sun May 25, 2008 4:17 am

Center Module Content

Post by landon0000 » Sun May 25, 2008 4:23 am

If you visit my site (http://www.total-personal-security.com/), you will notice that all of the content within the modules is left-justified. how can i get the content in the ads, the google search, tps login, most popular articles to be centered?

herb200mph
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 3592
Joined: Sun Jun 25, 2006 12:12 am
Location: Salisbury, NC/USA (N. of Charlotte)
Contact:

Re: Center Module Content

Post by herb200mph » Sun May 25, 2008 11:33 am

The layout looks good as it is. Centering, especially with lists, makes them more difficult to read. Personally, I'd leave things as they are.
Author: Joomla! 5: Boots on the Ground, Volume 1 @ Amazon.com
Author: Joomla! 4: BASIC TRAINING - Boots on the Ground @ Amazon.com
Joomla! Magazine - https://magazine.joomla.org/all-issues/ ... c-training

wwalla
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 195
Joined: Sat Jan 10, 2009 7:56 pm
Location: USA
Contact:

Re: Center Module Content

Post by wwalla » Thu Aug 27, 2009 2:45 am

I agree but how to center them in general? Like mine at expertsiq.com . I have an image rotator that would look better if it could be centered.. How can I do that with any module?

TIA
Thanks!
Cisco Training Videos www.ccieadvisor.com Online

wwalla
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 195
Joined: Sat Jan 10, 2009 7:56 pm
Location: USA
Contact:

Re: Center Module Content

Post by wwalla » Tue Sep 08, 2009 4:31 am

Have not found a good solution to this really. it still floats at the top.
Thanks!
Cisco Training Videos www.ccieadvisor.com Online

luizarios
Joomla! Intern
Joomla! Intern
Posts: 64
Joined: Mon Dec 07, 2009 12:01 am

Re: Center Module Content

Post by luizarios » Thu Jul 15, 2010 6:13 am

hi all, took me ages to find out the answer for this one so I thought I'd share it if someone else needs it. VERY simple:

on index.php find the module you want to center, then put it between <center> </center>

example:
<center>
<jdoc:include type="modules" name="user1" style="none" />
</center>

problem is, this is a soon to be deprecated html tag, so does someone knows a better way using css?

summerdays
Joomla! Apprentice
Joomla! Apprentice
Posts: 8
Joined: Mon Aug 30, 2010 3:26 am

Re: Center Module Content

Post by summerdays » Sat Mar 05, 2011 5:42 pm

Hi, yes there is away to avoid using <center></center> in the html

in your template.css file add a div class as such:
div.centermodule
{
text-align:center;
}

Now in your index.php file replace the following text:
<center>
<jdoc:include type="modules" name="user1" style="none" />
</center>

By this:

<div class="centermodule">
<jdoc:include type="modules" name="user1" style="none" />
</div>

It works and won't become obsolete :)

BHuff309
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Thu Apr 07, 2011 8:44 pm

Re: Center Module Content

Post by BHuff309 » Thu Apr 07, 2011 8:45 pm

I used this and it indeed worked, but how to I apply this to just one of the modules instead of all of them?

mwweb
Joomla! Intern
Joomla! Intern
Posts: 52
Joined: Tue Sep 20, 2011 4:51 pm
Contact:

Re: Center Module Content

Post by mwweb » Thu Jan 19, 2012 11:12 pm

I know this is old, but I've been having this problem too. What I did was create a table and insert it in the column I wanted, and put spaces in the other column until I got it lined up. Not a great solution, but it worked.
Char

"Remember there's no such thing as a small act of kindness. Every act creates a ripple with no logical end.". Scott Adams

thel33tone
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Thu Oct 11, 2012 6:54 pm

Re: Center Module Content

Post by thel33tone » Fri Jan 18, 2013 5:24 am

yes, and i have not done it yet but what comes to mind is to have some modules use a different template/css source, please someone elaborate on my thought here as i am struggling with this myself.

thel33tone
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Thu Oct 11, 2012 6:54 pm

Re: Center Module Content

Post by thel33tone » Fri Jan 18, 2013 7:16 am

i edited the javascript js files of the Unite Revolution Slider module and got it to work. see here http://ecbiz129.inmotionhosting.com/~brickf6/

the module costs 14 dollars but is worth it, and i can send you the modified java file if you like, email me if you need it at [email protected] you can get the module here: http://codecanyon.net/item/slider-revol ... themepunch

you have to use the iframe wrapper module to include it, and put it in as a html file. see my example here (help yourself to the source code) of a stripped down version of what the slider can do: http://ecbiz129.inmotionhosting.com/~br ... anner.html


Locked

Return to “Templates for Joomla! 1.5”