Centering image both horizontally and vertically Topic is solved

General questions relating to Joomla! 3.x.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting.
Forum Post Assistant - If you are serious about wanting help, you should use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10
Locked
User avatar
cybertrax
Joomla! Apprentice
Joomla! Apprentice
Posts: 43
Joined: Thu Mar 12, 2009 1:18 am
Contact:

Centering image both horizontally and vertically

Post by cybertrax » Sat Oct 11, 2014 7:49 pm

Got a rather unusual one here.

Needing an image (logo) in a module to be centered/centred. However, Joomla only does this in the module itself - I want the actual module to be in middle of the page. I've done a workaround using blanker images top and bottom of logo, can be seen at www.traxglobal.net. Luckily it's one of my own sites so not as important as if it were a client's site. Problem is, although this looks fine on my own screen which is 19" widescreen, and is 'acceptable' in an old square monitor, viewed recently ona client's 26" monitor and was a bit ashamed of how it looked - the logo ideally needs to be middle of page to overlay the video background of spinning globe.

Normally I would have made it stay in middle of page by making it part of the background image which is forced to fill all screens, but this can't be an option due to existing video background. Have tried various other options, and they make it centre of module, but this isn't the same as centre of the screen. Is this doable, or do I have to accept using blankers and a hit/miss positioning on different sized screens?

User avatar
cybertrax
Joomla! Apprentice
Joomla! Apprentice
Posts: 43
Joined: Thu Mar 12, 2009 1:18 am
Contact:

Re: Centering image both horizontally and vertically

Post by cybertrax » Thu Aug 09, 2018 11:39 am

Almost 4 years later, and still needing to learn how to do this! I'm now redesigning the traxglobal site as had a server crash at which point I found out the backups done through Cpanel were corrupt - all 3 months of them! I now use Akeeba for future backups which works fine, but I still have the issue of making an image centre both horizontally and vertically. I can't use normal background CSS as I already have a video as a background, and I tried to use a template-custom css file, which strangely sent the site into a complete error.

Does anyone know how to centre an image so that it stays in the centre of the screen no matter what the screen size?

User avatar
fcoulter
Joomla! Ace
Joomla! Ace
Posts: 1685
Joined: Thu Sep 13, 2007 11:39 am
Location: UK
Contact:

Re: Centering image both horizontally and vertically

Post by fcoulter » Thu Aug 09, 2018 12:25 pm

http://www.spiralscripts.co.uk for Joomla! extensions
http://www.fionacoulter.com/blog my personal website
Security Forum moderator :: VEL team member
"Wearing my tin foil hat with pride"

User avatar
cybertrax
Joomla! Apprentice
Joomla! Apprentice
Posts: 43
Joined: Thu Mar 12, 2009 1:18 am
Contact:

Re: Centering image both horizontally and vertically

Post by cybertrax » Thu Aug 09, 2018 2:02 pm

Thank you.
Didn't do exactly what I was looking for, but much further along now, and managed to more or less get it sorted.

User avatar
leolam
Joomla! Master
Joomla! Master
Posts: 20652
Joined: Mon Aug 29, 2005 10:17 am
Location: Netherlands/ Germany/ S'pore/Bogor/ North America
Contact:

Re: Centering image both horizontally and vertically

Post by leolam » Fri Aug 10, 2018 4:01 am

cybertrax wrote:
Sat Oct 11, 2014 7:49 pm
Needing an image (logo) in a module to be centered/centred. However, Joomla only does this in the module itself - I want the actual module to be in middle of the page.
STumbled on this one and good to see you got it resolved. You can achieve this in another way by using the {loadposition} option to load the module in the page. This tag can be centered with any editor. You can also use Modules Anywhere which would be very helpful as well

Leo 8)
Last edited by toivo on Fri Aug 10, 2018 10:32 am, edited 1 time in total.
Reason: mod note: changed the link to point to JED
Joomla's #1 Professional Services Provider:
#Joomla Professional Support: https://gws-desk.com -
#Joomla Specialized Hosting Solutions: https://gws-host.com -


Locked

Return to “General Questions/New to Joomla! 3.x”