Static Header

General questions relating to Joomla! 4.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
Post Reply
topcat_ism
Joomla! Apprentice
Joomla! Apprentice
Posts: 38
Joined: Sat Nov 11, 2017 4:12 pm

Static Header

Post by topcat_ism » Sat Oct 16, 2021 11:32 am

Hi. I have joomla 4 set up. Cassiopiea. Everything is cool but I need to know how to fix the header container in place. I don't like the content expanding on oversize screens. I have max width set at 1100. Even the header is no repeat and fixed size, but it drifts to the left as the screen widens. The other containers stay in place but the header moves left. Please. Tell me or send me where I can come up with a solution. Thank you. the site is www.topcatlive.com

SharkyKZ
Joomla! Hero
Joomla! Hero
Posts: 2020
Joined: Fri Jul 05, 2013 10:35 am
Location: Parts Unknown

Re: Static Header

Post by SharkyKZ » Sat Oct 16, 2021 11:50 am

Use auto horizontal margin and set width to 100%:

Code: Select all

.container-header {
	margin: 0 auto;
	max-width: 1320px;
	width: 100%;
}

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

Re: Static Header

Post by Per Yngve Berg » Sat Oct 16, 2021 12:07 pm

Have you tried setting the Template to "Fluid" Layout?

topcat_ism
Joomla! Apprentice
Joomla! Apprentice
Posts: 38
Joined: Sat Nov 11, 2017 4:12 pm

Re: Static Header

Post by topcat_ism » Sat Oct 16, 2021 12:12 pm

It came set to fluid. I didn't like it. I am about to try the auto margin

topcat_ism
Joomla! Apprentice
Joomla! Apprentice
Posts: 38
Joined: Sat Nov 11, 2017 4:12 pm

Re: Static Header

Post by topcat_ism » Sat Oct 16, 2021 12:17 pm

That does fix the container to static. But it shrinks the header to half size. There is something that I am missing

topcat_ism
Joomla! Apprentice
Joomla! Apprentice
Posts: 38
Joined: Sat Nov 11, 2017 4:12 pm

Re: Static Header

Post by topcat_ism » Sat Oct 16, 2021 12:21 pm

Wow. That's it. I changed the width from 100% to 1320 px's and bam. It was exactly what I wanted. Will that fly?

topcat_ism
Joomla! Apprentice
Joomla! Apprentice
Posts: 38
Joined: Sat Nov 11, 2017 4:12 pm

Re: Static Header

Post by topcat_ism » Sat Oct 16, 2021 12:43 pm

Took me just a few minutes to learn why you said 100%. It looked great on PC. When I check my phone the large image was still large. Is there way to solve that? It is perfect on computer.

topcat_ism
Joomla! Apprentice
Joomla! Apprentice
Posts: 38
Joined: Sat Nov 11, 2017 4:12 pm

Re: Static Header

Post by topcat_ism » Sat Oct 16, 2021 1:08 pm

Umm... You told me right the first time Mr Sharky. I flubbed up entering it the way it was shone. I back pedaled until I saw it. I entered it as you suggested and it worked fine on PC and on phone. Thank you so much Mr Sharky

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

Re: Static Header

Post by Per Yngve Berg » Sat Oct 16, 2021 2:09 pm

On landscape mobile, the images only take up half the width.


Post Reply

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