Happening now | Shopify Community AMA: User Research with CXL | Ask your questions now!

How can I align the header to 1 line? Sense Theme

Solved

How can I align the header to 1 line? Sense Theme

TimD3
Tourist
9 0 1

I'm trying to make the header be all on 1 line instead of the cart/currency in the upper right and the logo above the menu options.

I'd like the logo in the center or to the left of all the menu options with the cart/currency on the same line on the right side.

Using Sense Theme.

Photo for reference, thank you.Screenshot 2024-07-31 123823.png

Accepted Solution (1)

BSSCommerce-B2B
Shopify Partner
1972 564 568

This is an accepted solution.

Hi @TimD3 ,

I have reviewed your requirement, you just need to edit css script and the issue will be resolved.  You can follow my instructions! 

 

Step 1: Go to Admin -> Online store -> Theme > Edit code:

BSSCommerceB2B_0-1722450068798.png

 

Step 2: Search for the file base.css. And add this code snippet to the end of the file.

.header {
    display: flex !important;
}
.header__icons.header__icons--localization.header-localization {
    padding-top: 10px !important;
}
.header__icons {
    flex-direction: row-reverse !important;
}

In this step, I make the logo in the left of all the menu options with the cart/currency on the same line on the right side.

Step 3: Save your code and reload this page.

=>> The result: 

BSSCommerceB2B_1-1722450185022.png

 

I hope these instructions will help you. If they are helpful, please give us likes and mark as the solution.

Have a nice day sir! 

 

B2B Wholesale Solution: Streamline your B2B operation with advanced features like wholesale registration forms, custom pricing.


B2B Portal, Quote, Net 30: Speed up purchasing and streamline your quotation process with advanced features like quick order, request for quote.


B2B Lock Password Protect: Easily control access to pages, products, and pricing with robust features.


BSS Commerce - Full-service eCommerce Agency I Use Shopify for 1$ in the first month now

View solution in original post

Replies 7 (7)

shahrozbabar5
Shopify Partner
282 22 31

For a quick fix, you can use custom CSS to adjust the header layout in your Sense Theme. Here’s a simplified approach:

1. **Add Custom CSS**:

- Go to your Shopify admin panel.
- Navigate to `Online Store` > `Themes`.
- Click on `Customize` for your current theme.
- Click on `Theme settings` > `Custom CSS` (or you might find `Additional CSS`).

 

2. **Paste the Following CSS**:


/* Adjust header layout */
.header__inner {
display: flex;
justify-content: space-between;
align-items: center;
}

.header__logo {
flex: 1;
text-align: center; /* Center the logo */
}

.header__menu {
flex: 2;
text-align: center; /* Center the menu items */
}

.header__icons {
flex: 1;
text-align: right; /* Align icons to the right */
}

@media (max-width: 768px) {
.header__inner {
flex-direction: column;
align-items: center;
}
}
```

3. **Save and Preview**:

 

- Save the changes and preview your store to ensure the header elements are aligned as desired.

This CSS assumes the default classes used in the Sense Theme for header components. If the classes differ, you might need to inspect your header’s HTML structure (using browser developer tools) to adjust the class names accordingly.

let me know if it works

Need a Shopify Expert and Specialist? Let's chat on WhatsApp +923046983349 and bring your vision to life!


Custom Shopify Store Design | Premium Themes | Variant Apps Expert


Your Coffee Tip a seamless synergy. ❤️

TimD3
Tourist
9 0 1

nothing changed.

 

I copied from "/* Adjust header layout */" to "} }"

shahrozbabar5
Shopify Partner
282 22 31

please provide me store link so i can inspect

Need a Shopify Expert and Specialist? Let's chat on WhatsApp +923046983349 and bring your vision to life!


Custom Shopify Store Design | Premium Themes | Variant Apps Expert


Your Coffee Tip a seamless synergy. ❤️

TimD3
Tourist
9 0 1
shahrozbabar5
Shopify Partner
282 22 31

do you know the coding stuff, I'll guide give you the code to use in your header.liquid file so you can modiy

 

Need a Shopify Expert and Specialist? Let's chat on WhatsApp +923046983349 and bring your vision to life!


Custom Shopify Store Design | Premium Themes | Variant Apps Expert


Your Coffee Tip a seamless synergy. ❤️

TimD3
Tourist
9 0 1

I know how to get to that area and find the correct file. I just need the code and where to put it

BSSCommerce-B2B
Shopify Partner
1972 564 568

This is an accepted solution.

Hi @TimD3 ,

I have reviewed your requirement, you just need to edit css script and the issue will be resolved.  You can follow my instructions! 

 

Step 1: Go to Admin -> Online store -> Theme > Edit code:

BSSCommerceB2B_0-1722450068798.png

 

Step 2: Search for the file base.css. And add this code snippet to the end of the file.

.header {
    display: flex !important;
}
.header__icons.header__icons--localization.header-localization {
    padding-top: 10px !important;
}
.header__icons {
    flex-direction: row-reverse !important;
}

In this step, I make the logo in the left of all the menu options with the cart/currency on the same line on the right side.

Step 3: Save your code and reload this page.

=>> The result: 

BSSCommerceB2B_1-1722450185022.png

 

I hope these instructions will help you. If they are helpful, please give us likes and mark as the solution.

Have a nice day sir! 

 

B2B Wholesale Solution: Streamline your B2B operation with advanced features like wholesale registration forms, custom pricing.


B2B Portal, Quote, Net 30: Speed up purchasing and streamline your quotation process with advanced features like quick order, request for quote.


B2B Lock Password Protect: Easily control access to pages, products, and pricing with robust features.


BSS Commerce - Full-service eCommerce Agency I Use Shopify for 1$ in the first month now