Simple module positioning

Everything to do with Joomla! 3.x templates and templating.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10.
Locked
TikkiRo
Joomla! Explorer
Joomla! Explorer
Posts: 369
Joined: Wed Sep 26, 2007 6:42 pm
Location: BELFAST, N, Ireland UK
Contact:

Simple module positioning

Post by TikkiRo » Fri Apr 23, 2021 3:13 pm

I didn't know where to ask this Q as it might relate to either the template, CSS or a module but given the simplicity of the problem hopefully someone will still be able to help.

Basically I'm testing out a new template (ET-Creative by Engine Templates) and couldn't get an image placed where I wanted it so opted to create a module & put it into that. So now my problem is that I can't get it centered on the page. Simple?? I didn't want it centered over the content so please don't suggest I just stick it in there.

I've searched high & low in every CSS file, template file and any other file I could find for what I presumed was the place to make the change - sp_xhtml outline - (the module position) to no avail.

https://www.kitsandcards.co.uk/jgtc3/index.php

Thanks.
Last edited by toivo on Sat Apr 24, 2021 9:18 am, edited 1 time in total.
Reason: mod note: moved from 3.x Extensions

User avatar
AMurray
Joomla! Exemplar
Joomla! Exemplar
Posts: 9744
Joined: Sat Feb 13, 2010 7:35 am
Location: Australia

Re: Simple module positioning

Post by AMurray » Fri Apr 23, 2021 11:51 pm

Assuming you mean your banner image at the top of the page, sitting in a custom module....

1. You can centre the image through the image properties but this depends on the editor you're using as to how easy this is.

2. You can use CSS and set the alignment and margins. Refer to https://www.w3schools.com/howto/howto_c ... center.asp

What article editor are you using (set in global configuration). Suggest trying JCE Editor, for easier editing of elements like images.

Suggest keeping w3schools.com as a bookmarked site, as it is a very handy all things web-coding reference.

Also, I'm not sure this template will work forever - it still indicates it works with JOomla 2.5 (long obsolete) so it probably won't work in to the future with current PHP versions 7.4 and 8.0 (or with Joomla 4). I don't know therefore if the age of the template has anything to do with the issue at hand.
Regards - A Murray
General Support Moderator

TikkiRo
Joomla! Explorer
Joomla! Explorer
Posts: 369
Joined: Wed Sep 26, 2007 6:42 pm
Location: BELFAST, N, Ireland UK
Contact:

Re: Simple module positioning

Post by TikkiRo » Sat Apr 24, 2021 10:28 am

Ahh thanks for that speedy response & good info. Intrigued about the template age issue as I'd assumed it was a current up to date responsive one so I might well have to look at another one in that case. I'm using JCE ok and do have the image centered in the module setup but that's not made a button of difference. In fact it doesn't seem to matter what alignment I set in the editor it has no effect on the front end. I'd just no idea where to look to find the CSS for it, but presume there's a way to do it within the module itself as an override or something so I'll investigate that a bit more?

Thanks again for the help :)

User avatar
Per Yngve Berg
Joomla! Master
Joomla! Master
Posts: 30940
Joined: Mon Oct 27, 2008 9:27 pm
Location: Romerike, Norway

Re: Simple module positioning

Post by Per Yngve Berg » Sat Apr 24, 2021 10:51 am

"width: 100%" on the image does the trick.

User avatar
Pavel-ww
Joomla! Ace
Joomla! Ace
Posts: 1637
Joined: Tue Jun 30, 2020 12:17 pm

Re: Simple module positioning

Post by Pavel-ww » Sat Apr 24, 2021 2:29 pm

... or margin: 0 auto;


Locked

Return to “Templates for Joomla! 3.x”