Header Center - Question | JoomShaper
Black Friday sale is live with flat 50% OFF. Sale ends soon! Grab your deal now!

Header Center

AM

Anna Martinek

SP Page Builder 2 years ago

we have created a custom header in a template and want to center our own logo and the main menu in this header. Unfortunately, we have not found any reference to where this is explained. The only thing we found was this:

sp-header .logo {

margin: 0px auto; } .sp-megamenu-parent { margin: 0px auto; } Unfortunately that didn't work. Please let us know what we need to do. Our web is a Joomla 4 web on the local server. Best regards Hans

0
11 Answers
Paul Frankowski
Paul Frankowski
Accepted Answer
Senior Staff 2 years ago #116337

Hi Anna,

  1. Please create a mock-up what you need and share link to image.
  2. Please tell me what template you used on localhost, raw Helix Ultimate or different one?

In general, we expect from webmasters CSS knowledge that's why we cannot describe in documenation every possible case.

0
AM
Anna Martinek
Accepted Answer
2 years ago #116339

OK, I don't know why you answer so aggressively? The CSS code comes from your forum.

it is the template helix ultimate 2.0.12

0
Paul Frankowski
Paul Frankowski
Accepted Answer
Senior Staff 2 years ago #116341

I don't understand your answer, no morning coffee or what? Oh..


Where is mock-up (img) what you really want to get afer ? two rows or a single row with centered columns?

0
AM
Anna Martinek
Accepted Answer
2 years ago #116343

Here is the link to the screenshot there are two rows

0
Paul Frankowski
Paul Frankowski
Accepted Answer
Senior Staff 2 years ago #116345

where is that link?


Q: Do you need logo and menu inside a single row (header) ?

0
Paul Frankowski
Paul Frankowski
Accepted Answer
Senior Staff 2 years ago #116346

Do you know that row that is menu inside must be named "header" according to Helix documenation! If not yet, please do that right now.

0
Paul Frankowski
Paul Frankowski
Accepted Answer
Senior Staff 2 years ago #116348

But on your place I would use a different method.

Video guide: https://youtu.be/QvWCzsz95eE

In my example (and video) I used that CSS:

.sp-megamenu-parent > li > a, .sp-megamenu-parent > li > span {line-height: 50px;}
#sp-header .logo {height: 50px; display: block; align-items: center; text-align: center; margin: 10px auto;}
#sp-menu > .justify-content-end {justify-content: center !important;}
1
AM
Anna Martinek
Accepted Answer
2 years ago #116364

Perfect, Thanks for your help! Now everything works. Greetings Hans

0
AM
Anna Martinek
Accepted Answer
2 years ago #116379

now the problem has appeared, when scrolling the menu runs over the page content and is therefore not easy to read, https://screenmaker.at/images/helix-sticki.jpg

0
Paul Frankowski
Paul Frankowski
Accepted Answer
Senior Staff 2 years ago #116483

Maybe set bg color for header

#sp-header.header-sticky {background: #FFFFFF;}

"sticky" class means only when you scroll down.

0
AM
Anna Martinek
Accepted Answer
2 years ago #116908

Hi, How can I make only the menu sticky. The logo should not be visible when scrolling... The menu should cover the entire width of the monitor and be black in color. Thanks in advance https://screenmaker.at/images/helix-sticki2.jpg

0