Hi All,
I am trying to move ‘my account’, search bar and card in line with my announcement bar.
Currently this is aligned with the header logo.
Please see attached
Thanks,Anna
Hi All,
I am trying to move ‘my account’, search bar and card in line with my announcement bar.
Currently this is aligned with the header logo.
Please see attached
Thanks,Anna
can you please share your header code so i will check and let you know
go to edit code >>> section >>> header
Hi @KetanKumar
Code is
hh
{%- liquid
assign transparent_header = false
if template contains ‘collection’ and collection.image and section.settings.transparent_collection
assign transparent_header = true
elsif template contains ‘article’ and article.image and section.settings.transparent_article
assign transparent_header = true
elsif template == ‘index’ and section.settings.transparent_home
assign transparent_header = true
endif
if section.settings.main_menu_linklist != blank
assign main_menu_linklist = section.settings.main_menu_linklist
else
assign main_menu_linklist = ‘main-menu’
endif
assign secondary_menu_linklist = section.settings.secondary_menu_linklist
if section.settings.logo != blank
assign logo_denom = section.settings.logo.aspect_ratio | default: 1
assign logo_height = section.settings.logo_max_limit | divided_by: logo_denom
assign menu_height = logo_height | floor | plus: 30
assign logo_width = section.settings.logo_max_limit | append: ‘px’
assign logo_padding = 1 | divided_by: logo_denom | times: 100 | append: ‘%’
else
assign menu_height = 80
assign logo_width = ‘auto’
endif
if section.settings.header_style contains ‘logo_above’
assign menu_height = menu_height | plus: 51
endif
-%}
{%- style -%}
:root {
–menu-height: calc({{ menu_height }}px);
}
{%- if section.settings.logo != blank -%}
.header__logo__link::before { padding-bottom: {{ logo_padding }}; }
{%- endif -%}
{%- endstyle --%}
{% capture logos %}
{%- if transparent_header and section.settings.transparent_logo != blank and section.settings.logo != blank -%}
{%- assign has_transparent_logo = true -%}
{%- endif -%}
{% capture cart_status %}
{{cart.item_count}}
{% endcapture %}
{% capture minimal %}
{% capture cart_content %}
{% if section.settings.enable_account and shop.customer_accounts_enabled %}
{% endif %}{% if section.settings.enable_search %}
{% endif %}{% capture menu %}
{% capture drawer %}
{% if localization %}
{%- if currencies -%}
{% if template.name == ‘index’ %}
{% assign potential_action_target = shop.url | append: “/search?q={search_term_string}” %}
{% endif %}
{% schema %}
{
“name”: “Header”,
“settings”: [
{
“type”: “select”,
“id”: “header_style”,
“label”: “Header style”,
“default”: “logo_beside”,
“options”: [
{ “value”: “logo_above”, “label”: “Logo above menu”},
{ “value”: “logo_beside”, “label”: “Logo beside menu”},
{ “value”: “drawer”, “label”: “Mobile drawer menu”}
]
},
{
“type”: “header”,
“content”: “Logo”
},
{
“type”: “image_picker”,
“id”: “logo”,
“label”: “Image”
},
{
“type”: “range”,
“id”: “logo_max_limit”,
“min”: 5,
“max”: 495,
“step”: 5,
“unit”: “px”,
“label”: “Width”,
“default”: 120
},
{
“type”: “header”,
“content”: “Links”
},
{
“type”: “link_list”,
“label”: “Main menu”,
“id”: “main_menu_linklist”
},
{
“type”: “checkbox”,
“id”: “enable_search”,
“default”: true,
“label”: “Show search”
},
{
“type”: “checkbox”,
“id”: “enable_account”,
“default”: true,
“label”: “Show account link in header”,
“info”: “Accounts must be optional or required in your checkout settings”
},
{
“type”: “header”,
“content”: “Sticky header”
},
{
“type”: “select”,
“id”: “header_sticky”,
“label”: “Header scroll behavior”,
“default”: “static”,
“options”: [
{ “value”: “static”, “label”: “Default”},
{ “value”: “sticky”, “label”: “Sticky header”}
]
},
{
“type”: “header”,
“content”: “Transparent header”
},
{
“type”: “checkbox”,
“id”: “transparent_home”,
“label”: “Enable on Home page”,
“default”: false
},
{
“type”: “checkbox”,
“id”: “transparent_collection”,
“label”: “Enable on Collection pages”,
“default”: false
},
{
“type”: “checkbox”,
“id”: “transparent_article”,
“label”: “Enable on Article pages”,
“default”: false
},
{
“type”: “image_picker”,
“id”: “transparent_logo”,
“label”: “Alternate logo”
},
{
“type”: “header”,
“content”: “Mobile menu”
},
{
“type”: “link_list”,
“id”: “secondary_menu_linklist”,
“label”: “Secondary menu”
}
],
“blocks”: [
{
“name”: “Image”,
“type”: “image”,
“settings”: [
{
“type”: “select”,
“id”: “position”,
“label”: “Link position in main menu”,
“default”: “1”,
“options”: [
{ “value”: “1”, “label”: “Item 1”},
{ “value”: “2”, “label”: “Item 2”},
{ “value”: “3”, “label”: “Item 3”},
{ “value”: “4”, “label”: “Item 4”},
{ “value”: “5”, “label”: “Item 5”},
{ “value”: “6”, “label”: “Item 6”},
{ “value”: “7”, “label”: “Item 7”},
{ “value”: “8”, “label”: “Item 8”},
{ “value”: “9”, “label”: “Item 9”},
{ “value”: “10”, “label”: “Item 10”}
]
},
{
“type”: “image_picker”,
“id”: “image”,
“label”: “Image”
},
{
“type”: “range”,
“id”: “aspect_ratio”,
“min”: 0.5,
“max”: 1.5,
“step”: 0.1,
“unit”: “:1”,
“label”: “Image scaling ratio”,
“info”: “Wide to tall”,
“default”: 0.5
},
{
“type”: “checkbox”,
“id”: “wide_image”,
“label”: “Wide image”,
“default”: true
},
{
“type”: “select”,
“id”: “bg_position”,
“label”: “Position”,
“default”: “center-center”,
“options”: [
{ “label”: “Top”, “value”: “center-top” },
{ “label”: “Right”, “value”: “right-center” },
{ “label”: “Center”, “value”: “center-center” },
{ “label”: “Left”, “value”: “left-center” },
{ “label”: “Bottom”, “value”: “center-bottom” }
]
},
{
“type”: “text”,
“id”: “title”,
“label”: “Heading”
},
{
“type”: “text”,
“id”: “link_text”,
“label”: “Text”
},
{
“type”: “url”,
“id”: “link”,
“label”: “Link”
}
]
}
]
}
{% endschema %}
{%- liquid
assign transparent_header = false
if template contains ‘collection’ and collection.image and section.settings.transparent_collection
assign transparent_header = true
elsif template contains ‘article’ and article.image and section.settings.transparent_article
assign transparent_header = true
elsif template == ‘index’ and section.settings.transparent_home
assign transparent_header = true
endif
if section.settings.main_menu_linklist != blank
assign main_menu_linklist = section.settings.main_menu_linklist
else
assign main_menu_linklist = ‘main-menu’
endif
assign secondary_menu_linklist = section.settings.secondary_menu_linklist
if section.settings.logo != blank
assign logo_denom = section.settings.logo.aspect_ratio | default: 1
assign logo_height = section.settings.logo_max_limit | divided_by: logo_denom
assign menu_height = logo_height | floor | plus: 30
assign logo_width = section.settings.logo_max_limit | append: ‘px’
assign logo_padding = 1 | divided_by: logo_denom | times: 100 | append: ‘%’
else
assign menu_height = 80
assign logo_width = ‘auto’
endif
if section.settings.header_style contains ‘logo_above’
assign menu_height = menu_height | plus: 51
endif
-%}
{%- style -%}
:root {
–menu-height: calc({{ menu_height }}px);
}
{%- if section.settings.logo != blank -%}
.header__logo__link::before { padding-bottom: {{ logo_padding }}; }
{%- endif -%}
{%- endstyle --%}
{% capture logos %}
{%- if transparent_header and section.settings.transparent_logo != blank and section.settings.logo != blank -%}
{%- assign has_transparent_logo = true -%}
{%- endif -%}
{% capture cart_status %}
{{cart.item_count}}
{% endcapture %}
{% capture minimal %}
{% capture cart_content %}
{% if section.settings.enable_account and shop.customer_accounts_enabled %}
{% endif %}{% if section.settings.enable_search %}
{% endif %}{% capture menu %}
{% capture drawer %}
{% if localization %}
{%- if currencies -%}
{% if template.name == ‘index’ %}
{% assign potential_action_target = shop.url | append: “/search?q={search_term_string}” %}
{% endif %}
{% schema %}
{
“name”: “Header”,
“settings”: [
{
“type”: “select”,
“id”: “header_style”,
“label”: “Header style”,
“default”: “logo_beside”,
“options”: [
{ “value”: “logo_above”, “label”: “Logo above menu”},
{ “value”: “logo_beside”, “label”: “Logo beside menu”},
{ “value”: “drawer”, “label”: “Mobile drawer menu”}
]
},
{
“type”: “header”,
“content”: “Logo”
},
{
“type”: “image_picker”,
“id”: “logo”,
“label”: “Image”
},
{
“type”: “range”,
“id”: “logo_max_limit”,
“min”: 5,
“max”: 495,
“step”: 5,
“unit”: “px”,
“label”: “Width”,
“default”: 120
},
{
“type”: “header”,
“content”: “Links”
},
{
“type”: “link_list”,
“label”: “Main menu”,
“id”: “main_menu_linklist”
},
{
“type”: “checkbox”,
“id”: “enable_search”,
“default”: true,
“label”: “Show search”
},
{
“type”: “checkbox”,
“id”: “enable_account”,
“default”: true,
“label”: “Show account link in header”,
“info”: “Accounts must be optional or required in your checkout settings”
},
{
“type”: “header”,
“content”: “Sticky header”
},
{
“type”: “select”,
“id”: “header_sticky”,
“label”: “Header scroll behavior”,
“default”: “static”,
“options”: [
{ “value”: “static”, “label”: “Default”},
{ “value”: “sticky”, “label”: “Sticky header”}
]
},
{
“type”: “header”,
“content”: “Transparent header”
},
{
“type”: “checkbox”,
“id”: “transparent_home”,
“label”: “Enable on Home page”,
“default”: false
},
{
“type”: “checkbox”,
“id”: “transparent_collection”,
“label”: “Enable on Collection pages”,
“default”: false
},
{
“type”: “checkbox”,
“id”: “transparent_article”,
“label”: “Enable on Article pages”,
“default”: false
},
{
“type”: “image_picker”,
“id”: “transparent_logo”,
“label”: “Alternate logo”
},
{
“type”: “header”,
“content”: “Mobile menu”
},
{
“type”: “link_list”,
“id”: “secondary_menu_linklist”,
“label”: “Secondary menu”
}
],
“blocks”: [
{
“name”: “Image”,
“type”: “image”,
“settings”: [
{
“type”: “select”,
“id”: “position”,
“label”: “Link position in main menu”,
“default”: “1”,
“options”: [
{ “value”: “1”, “label”: “Item 1”},
{ “value”: “2”, “label”: “Item 2”},
{ “value”: “3”, “label”: “Item 3”},
{ “value”: “4”, “label”: “Item 4”},
{ “value”: “5”, “label”: “Item 5”},
{ “value”: “6”, “label”: “Item 6”},
{ “value”: “7”, “label”: “Item 7”},
{ “value”: “8”, “label”: “Item 8”},
{ “value”: “9”, “label”: “Item 9”},
{ “value”: “10”, “label”: “Item 10”}
]
},
{
“type”: “image_picker”,
“id”: “image”,
“label”: “Image”
},
{
“type”: “range”,
“id”: “aspect_ratio”,
“min”: 0.5,
“max”: 1.5,
“step”: 0.1,
“unit”: “:1”,
“label”: “Image scaling ratio”,
“info”: “Wide to tall”,
“default”: 0.5
},
{
“type”: “checkbox”,
“id”: “wide_image”,
“label”: “Wide image”,
“default”: true
},
{
“type”: “select”,
“id”: “bg_position”,
“label”: “Position”,
“default”: “center-center”,
“options”: [
{ “label”: “Top”, “value”: “center-top” },
{ “label”: “Right”, “value”: “right-center” },
{ “label”: “Center”, “value”: “center-center” },
{ “label”: “Left”, “value”: “left-center” },
{ “label”: “Bottom”, “value”: “center-bottom” }
]
},
{
“type”: “text”,
“id”: “title”,
“label”: “Heading”
},
{
“type”: “text”,
“id”: “link_text”,
“label”: “Text”
},
{
“type”: “url”,
“id”: “link”,
“label”: “Link”
}
]
}
]
}
{% endschema %}
{%- liquid
assign transparent_header = false
if template contains ‘collection’ and collection.image and section.settings.transparent_collection
assign transparent_header = true
elsif template contains ‘article’ and article.image and section.settings.transparent_article
assign transparent_header = true
elsif template == ‘index’ and section.settings.transparent_home
assign transparent_header = true
endif
if section.settings.main_menu_linklist != blank
assign main_menu_linklist = section.settings.main_menu_linklist
else
assign main_menu_linklist = ‘main-menu’
endif
assign secondary_menu_linklist = section.settings.secondary_menu_linklist
if section.settings.logo != blank
assign logo_denom = section.settings.logo.aspect_ratio | default: 1
assign logo_height = section.settings.logo_max_limit | divided_by: logo_denom
assign menu_height = logo_height | floor | plus: 30
assign logo_width = section.settings.logo_max_limit | append: ‘px’
assign logo_padding = 1 | divided_by: logo_denom | times: 100 | append: ‘%’
else
assign menu_height = 80
assign logo_width = ‘auto’
endif
if section.settings.header_style contains ‘logo_above’
assign menu_height = menu_height | plus: 51
endif
-%}
{%- style -%}
:root {
–menu-height: calc({{ menu_height }}px);
}
{%- if section.settings.logo != blank -%}
.header__logo__link::before { padding-bottom: {{ logo_padding }}; }
{%- endif -%}
{%- endstyle --%}
{% capture logos %}
{%- if transparent_header and section.settings.transparent_logo != blank and section.settings.logo != blank -%}
{%- assign has_transparent_logo = true -%}
{%- endif -%}
{% capture cart_status %}
{{cart.item_count}}
{% endcapture %}
{% capture minimal %}
{% capture cart_content %}
{% if section.settings.enable_account and shop.customer_accounts_enabled %}
{% endif %}{% if section.settings.enable_search %}
{% endif %}{% capture menu %}
{% capture drawer %}
{% if localization %}
{%- if currencies -%}
{% if template.name == ‘index’ %}
{% assign potential_action_target = shop.url | append: “/search?q={search_term_string}” %}
{% endif %}
{% schema %}
{
“name”: “Header”,
“settings”: [
{
“type”: “select”,
“id”: “header_style”,
“label”: “Header style”,
“default”: “logo_beside”,
“options”: [
{ “value”: “logo_above”, “label”: “Logo above menu”},
{ “value”: “logo_beside”, “label”: “Logo beside menu”},
{ “value”: “drawer”, “label”: “Mobile drawer menu”}
]
},
{
“type”: “header”,
“content”: “Logo”
},
{
“type”: “image_picker”,
“id”: “logo”,
“label”: “Image”
},
{
“type”: “range”,
“id”: “logo_max_limit”,
“min”: 5,
“max”: 495,
“step”: 5,
“unit”: “px”,
“label”: “Width”,
“default”: 120
},
{
“type”: “header”,
“content”: “Links”
},
{
“type”: “link_list”,
“label”: “Main menu”,
“id”: “main_menu_linklist”
},
{
“type”: “checkbox”,
“id”: “enable_search”,
“default”: true,
“label”: “Show search”
},
{
“type”: “checkbox”,
“id”: “enable_account”,
“default”: true,
“label”: “Show account link in header”,
“info”: “Accounts must be optional or required in your checkout settings”
},
{
“type”: “header”,
“content”: “Sticky header”
},
{
“type”: “select”,
“id”: “header_sticky”,
“label”: “Header scroll behavior”,
“default”: “static”,
“options”: [
{ “value”: “static”, “label”: “Default”},
{ “value”: “sticky”, “label”: “Sticky header”}
]
},
{
“type”: “header”,
“content”: “Transparent header”
},
{
“type”: “checkbox”,
“id”: “transparent_home”,
“label”: “Enable on Home page”,
“default”: false
},
{
“type”: “checkbox”,
“id”: “transparent_collection”,
“label”: “Enable on Collection pages”,
“default”: false
},
{
“type”: “checkbox”,
“id”: “transparent_article”,
“label”: “Enable on Article pages”,
“default”: false
},
{
“type”: “image_picker”,
“id”: “transparent_logo”,
“label”: “Alternate logo”
},
{
“type”: “header”,
“content”: “Mobile menu”
},
{
“type”: “link_list”,
“id”: “secondary_menu_linklist”,
“label”: “Secondary menu”
}
],
“blocks”: [
{
“name”: “Image”,
“type”: “image”,
“settings”: [
{
“type”: “select”,
“id”: “position”,
“label”: “Link position in main menu”,
“default”: “1”,
“options”: [
{ “value”: “1”, “label”: “Item 1”},
{ “value”: “2”, “label”: “Item 2”},
{ “value”: “3”, “label”: “Item 3”},
{ “value”: “4”, “label”: “Item 4”},
{ “value”: “5”, “label”: “Item 5”},
{ “value”: “6”, “label”: “Item 6”},
{ “value”: “7”, “label”: “Item 7”},
{ “value”: “8”, “label”: “Item 8”},
{ “value”: “9”, “label”: “Item 9”},
{ “value”: “10”, “label”: “Item 10”}
]
},
{
“type”: “image_picker”,
“id”: “image”,
“label”: “Image”
},
{
“type”: “range”,
“id”: “aspect_ratio”,
“min”: 0.5,
“max”: 1.5,
“step”: 0.1,
“unit”: “:1”,
“label”: “Image scaling ratio”,
“info”: “Wide to tall”,
“default”: 0.5
},
{
“type”: “checkbox”,
“id”: “wide_image”,
“label”: “Wide image”,
“default”: true
},
{
“type”: “select”,
“id”: “bg_position”,
“label”: “Position”,
“default”: “center-center”,
“options”: [
{ “label”: “Top”, “value”: “center-top” },
{ “label”: “Right”, “value”: “right-center” },
{ “label”: “Center”, “value”: “center-center” },
{ “label”: “Left”, “value”: “left-center” },
{ “label”: “Bottom”, “value”: “center-bottom” }
]
},
{
“type”: “text”,
“id”: “title”,
“label”: “Heading”
},
{
“type”: “text”,
“id”: “link_text”,
“label”: “Text”
},
{
“type”: “url”,
“id”: “link”,
“label”: “Link”
}
]
}
]
}
{% endschema %}