CSS align:vertical; not working properly in Firefox - html

I am trying to vertically center the contents of .onesizechart, which I have working in both Chrome and Safari, but does not work in either Firefox or IE. In Chrome and Safari the contents displays like so on hover but in Firefox and IE the contents display like this when I hover . The live site is here Not exactly sure what is causing this.
HTML/Liquid
<div class="medium-3 small-6 columns homepage-products left" onclick="location.href='{{ product.url }}'">
<a href="{{ product.url | within: collection }}">
<img src="{{ product.featured_image | product_img_url: 'grande' }}" alt="{{ product.title | escape }}" />
</a>
{% assign contains_os = false %}
{% for variant in product.variants %}
{% if variant.title contains 'OS' %}
{% assign contains_os = true %}
{% endif %}
{% endfor %}
{% if contains_os %}
<div class="onesizechart">
{% for variant in product.variants %}
{% if variant.inventory_quantity == 0 %}
<img src="{{ 'onesize-triangle-outofstock.png' | asset_url }}"/>
{% else %}
<img src="{{ 'onesize-triangle.png' | asset_url }}"/>
{% endif %}
{% endfor %}
</div>
{% else %}
<div class="homepage-sizechart">
<div class="sizes">
{{ 'size-triangle.png' | asset_url | img_tag }}
{% for variant in product.variants %}
<span class="{{ variant.title }}-product {% if variant.inventory_quantity == 0 %}outofstock{% endif %} {% if variant.title contains 'OS'%}hide{% endif %}">{{ variant.title }}</span>
{% endfor %}
</div>
</div>
{% endif %}
</div>
CSS
.homepage-products {
cursor: pointer;
margin-top: 20px;
}
.onesizechart {
opacity: 0;
position: absolute;
display: table;
width: 90%;
z-index: 999;
top: 5%;
bottom: 0;
right: 0;
margin: auto;
text-align: center;
}
.homepage-sizechart {
bottom: 0;
display: table-cell;
left: 0;
margin: auto;
opacity: 0;
position: absolute;
right: 0;
text-align: center;
top: 5%;
vertical-align: middle;
width: 90%;
z-index: 999;
}
.sizes {
position: relative;
}

Try this
change it display: inline-block; top: 30%;
.onesizechart {
opacity: 0;
position: absolute;
display: inline-block;
width: 90%;
z-index: 999;
top: 30%;
bottom: 0;
right: 0;
margin: auto;
text-align: center;
}

Related

Display Messages notifications inside a div box

When the user enter a not valid credentials it print this notificaitons message:
Sorry, your password was incorrect.<br/> Please double-check your password
But this doesn't look good when it is printed:
I want it to be printed between the Login button and the Forgot password.
Like that:
So theoretically the white box should expend to the bootom to leave so place for the notifications message
html file
<div class="testlol2" >
<div class="login-box" align="center">
<img class="logo" src="{% static 'images/testlogo.png' %}" alt="">
<div class="testlol" align="center">
<form action="" method="post">
{% csrf_token %}
{{ form|crispy }}
<div class="my-button">
<input class="login-button" type="submit" value="Log in">
</div>
</form>
{% if messages %}
<ul class="messages">
{% for message in messages %}
<p{% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message }}</p>
{% endfor %}
</ul>
{% endif %}
<a class="forgot" href="">Forgot password?</a>
</div>
</div>
</div>
css file
body{
background-color: #fafafa !important;
}
.messages {
position: relative;
top: 10px;
right: 8px;
color: red;
}
.logo {
position: relative;
top: 28px;
left: 134px;
width: 200px;
}
.testlol {
position: relative;
top: 115px;
right: 90px;
}
.testlol2 {
display:flex;
justify-content: center;
}
.login-box {
display:flex;
justify-content: center;
align-items: start;
align-self: center;
position: relative;
top: 100px;
background: #fff;
border: 1px solid #e6e6e6;
border-radius: 1px;
margin:0 0 10px;
padding: 10px 0;
height: 280px;
width: 325px;
}
.forgot {
position: absolute;
top: 128px;
right: 95px;
font-size: 12px;
margin-top: 12px;
text-align: center;
color: #000000;
line-height: 14px!important;
text-decoration: none;
}
Your code (css) is quite a mess. I tried making some minimal changes to it would partly look ok. Main fix was to make the .messages have margin of 115px from top rather than be positioned 115px from top, so that login-box would expand in height.
body {
background-color: #fafafa !important;
}
.messages {
position: relative;
top: 10px;
right: 8px;
color: red;
}
.logo {
position: relative;
top: 28px;
left: 134px;
width: 200px;
}
.testlol {
position:relative;
right: 90px;
margin-top: 115px;
}
.testlol2 {
display: flex;
justify-content: center;
}
.login-box {
display: flex;
justify-content: center;
align-items: start;
align-self: center;
position: relative;
top: 100px;
background: #fff;
border: 1px solid #e6e6e6;
border-radius: 1px;
margin: 0 0 10px;
padding: 10px 0;
/* height: 280px; */
width: 325px;
}
.forgot {
/* position: absolute; */
top: 128px;
right: 95px;
font-size: 12px;
margin-top: 12px;
text-align: center;
color: #000000;
line-height: 14px!important;
text-decoration: none;
}
<div class="testlol2">
<div class="login-box" align="center">
<img class="logo" src="{% static 'images/testlogo.png' %}" alt="">
<div class="testlol" align="center">
<form action="" method="post">
{% csrf_token %} {{ form|crispy }}
<div class="my-button">
<input class="login-button" type="submit" value="Log in">
</div>
</form>
{% if messages %}
<ul class="messages">
{% for message in messages %}
<p{% if message.tags %} class="{{ message.tags }}" {% endif %}>{{ message }}</p>
{% endfor %}
</ul>
{% endif %}
<a class="forgot" href="">Forgot password?</a>
</div>
</div>
</div>

How to decrease the slider speed in Django?

Please help to decrease speed, it's too fast. Searched a lot in google and everywhere there is Bootstrap solution. I even tried Bootstrap, that was too slow and different icons which didn't look good. Also Bootstrap version center it's PREV and NEXT icons for each image, which is also not looking good as I have different image height.
Is there any way to change speed in my current carousel? Please help.
my CSS looks like
/* PRODUCT DETAIL SLIDER START */
.product_detail-slider{
position: relative;
}
.product_detail-slider .owl-stage-outer{
overflow-x: hidden;
}
.product_detail-slider .owl-stage{
display: flex;
}
.product_detail-slider .owl-nav .owl-prev{
position: absolute;
top: calc(50% - 80px);;
left: 0;
border: none;
background-color: transparent;
}
.product_detail-slider .owl-nav .owl-prev span{
color: rgba(0, 0, 0, 0.30);
font-size: 80px;
transition: all 2s;
}
.product_detail-slider .owl-nav .owl-prev span:hover{
color: #000000;
}
.product_detail-slider .owl-nav .owl-next{
position: absolute;
top: calc(50% - 80px);
right: 0;
border: none;
background-color: transparent;
}
.product_detail-slider .owl-nav .owl-next span{
color: rgba(0, 0, 0, 0.30);
font-size: 80px;
transition: all 2s;
}
.product_detail-slider .owl-nav .owl-next span:hover{
color: #000000;
}
.owl-dots{
display: none;
}
/* PRODUCT DETAIL SLIDER END */
my HTML
<div class="product_detail-slider">
<div class="product_detail-slider_block">
<img src="{{ product.image_url }}" alt="" style="width:100%; padding-bottom: 20px;">
</div>
{% if product.image_2_url %}
<div class="product_detail-slider_block">
<img src="{{ product.image_2_url }}" alt="" style="width:100%; padding-bottom: 20px;">
</div>
{% endif %}
{% if product.image_3_url %}
<div class="product_detail-slider_block">
<img src="{{ product.image_3_url }}" alt="" style="width:100%; padding-bottom:20px;">
</div>
{% endif %}
{% if product.image_4_url %}
<div class="product_detail-slider_block">
<img src="{{ product.image_4_url }}" alt="" style="width:100%; padding-bottom:20px;">
</div>
{% endif %}
{% if product.image_5_url %}
<div class="product_detail-slider_block">
<img src="{{ product.image_5_url }}" alt="" style="width:100%; padding-bottom:20px;">
</div>
{% endif %}
{% if product.image_6_url %}
<div class="product_detail-slider_block">
<img src="{{ product.image_6_url }}" alt="" style="width:100%; padding-bottom:20px;">
</div>
{% endif %}
</div>

Why isn't module.css recognizing or using my CSS media queries?

I am working on a Hubspot project and have never encountered this issue before. My module.html file looks like this:
<div class="header_text" style="text-align: center; font-size: 36px; padding-top: 130px; font-family: Lustria; font-weight: semi-bold; color: #05254C;">
{% inline_text field="header_text" value="{{ module.header_text }}" %}
</div>
<div class="header_body_text" style="width: 50%; font-family: Arimo; font-size: 18px; margin: 0 auto; padding-top: 15px; color: #05254C; padding-bottom: 50px;">
{% inline_rich_text field="header_body_text" value="{{ module.header_body_text }}" %}
</div>
<!--
This secion houses each video in its own column, with the "video_titles" div also housing the video title underneath.
-->
<div class="video_titles">
<div class="row" style="width: 60%; text-align: center; margin: 0 auto; padding-top: 0px;">
<div class="column" style="background-color: #153357; width: 45%; margin: 0 auto; text-align: center; max-width: 550px;">
{% if module.test.player_id %}
{% set max_width = module.test.size_type == 'auto_custom_max' ? module.test.max_width : module.test.width %}
{% set max_height = module.test.size_type == 'auto_custom_max' ? module.test.max_height : module.test.height %}
{% widget_block video_player "embed_player"
overrideable=False,
type='scriptV4',
hide_playlist=True,
viral_sharing=False,
embed_button=False,
full_width={{ module.test.size_type == 'auto_full_width' }},
width="{{ max_width }}",
height="{{ max_height }}",
player_id="{{ module.test.player_id }}"
%}
{% widget_attribute "conversion_asset" %}
{{ module.test.conversion_asset|tojson|safe }}
{% end_widget_attribute %}
{% end_widget_block %}
{% endif %}
<p style="color: white; font-family: Lustria; font-size: 36px; border: 2px solid #638869; width: 80%; margin: 0 auto; padding: 40px; margin-top: 20px; margin-bottom: 20px;">
Athletics
</p>
</div>
<div class="column" style="background-color: #153357; width: 45%; margin: 0 auto; padding-top: -10px; float: left; max-width: 550px;">
{% if module.test_2.player_id %}
{% set max_width = module.test_2.size_type == 'auto_custom_max' ? module.test_2.max_width : module.test_2.width %}
{% set max_height = module.test_2.size_type == 'auto_custom_max' ? module.test_2.max_height : module.test_2.height %}
{% widget_block video_player "embed_player"
overrideable=False,
type='scriptV4',
hide_playlist=True,
viral_sharing=False,
embed_button=False,
full_width={{ module.test_2.size_type == 'auto_full_width' }},
width="{{ max_width }}",
height="{{ max_height }}",
player_id="{{ module.test_2.player_id }}"
%}
{% widget_attribute "conversion_asset" %}
{{ module.test_2.conversion_asset|tojson|safe }}
{% end_widget_attribute %}
{% end_widget_block %}
{% endif %}
<p style="color: white; font-family: Lustria; font-size: 36px; border: 2px solid #638869; width: 80%; margin: 0 auto; padding: 40px; margin-top: 20px; margin-bottom: 20px;">
STEM
</p>
</div>
</div>
</div>
<div class="video_titles" style="padding-top: 50px;">
<div class="row" style="width: 60%; text-align: center; margin: 0 auto; padding-top: 0px;">
<div class="column" style="background-color: #153357; width: 45%; margin: 0 auto; padding-top: -10px; float: left; max-width: 550px;">
{% if module.test_3.player_id %}
{% set max_width = module.test_3.size_type == 'auto_custom_max' ? module.test_3.max_width : module.test_3.width %}
{% set max_height = module.test_3.size_type == 'auto_custom_max' ? module.test_3.max_height : module.test_3.height %}
{% widget_block video_player "embed_player"
overrideable=False,
type='scriptV4',
hide_playlist=True,
viral_sharing=False,
embed_button=False,
full_width={{ module.test_3.size_type == 'auto_full_width' }},
width="{{ max_width }}",
height="{{ max_height }}",
player_id="{{ module.test_3.player_id }}"
%}
{% widget_attribute "conversion_asset" %}
{{ module.test_3.conversion_asset|tojson|safe }}
{% end_widget_attribute %}
{% end_widget_block %}
{% endif %}
<p style="color: white; font-family: Lustria; font-size: 30px; border: 2px solid #638869; width: 80%; margin: 0 auto; padding: 40px; margin-top: 20px; margin-bottom: 20px;">
Humanities
</p>
</div>
<div class="column" style="background-color: #153357; width: 45%; margin: 0 auto; padding-top: -10px; float: left; max-width: 550px;">
{% if module.test_2.player_id %}
{% set max_width = module.test_2.size_type == 'auto_custom_max' ? module.test_2.max_width : module.test_2.width %}
{% set max_height = module.test_2.size_type == 'auto_custom_max' ? module.test_2.max_height : module.test_2.height %}
{% widget_block video_player "embed_player"
overrideable=False,
type='scriptV4',
hide_playlist=True,
viral_sharing=False,
embed_button=False,
full_width={{ module.test_2.size_type == 'auto_full_width' }},
width="{{ max_width }}",
height="{{ max_height }}",
player_id="{{ module.test_2.player_id }}"
%}
{% widget_attribute "conversion_asset" %}
{{ module.test_2.conversion_asset|tojson|safe }}
{% end_widget_attribute %}
{% end_widget_block %}
{% endif %}
<p style="color: white; font-family: Lustria; font-size: 30px; border: 2px solid #638869; width: 80%; margin: 0 auto; padding: 40px; margin-top: 20px; margin-bottom: 20px;">
Performing Arts
</p>
</div>
</div>
</div>
<div class="video_titles" style="padding-top: 50px;">
<div class="row" style="width: 60%; text-align: center; margin: 0 auto; padding-top: 0px;">
<div class="column" style="background-color: #153357; width: 45%; margin: 0 auto; padding-top: -10px; float: left; max-width: 550px;">
{% if module.test_5.player_id %}
{% set max_width = module.test_5.size_type == 'auto_custom_max' ? module.test_5.max_width : module.test_5.width %}
{% set max_height = module.test_5.size_type == 'auto_custom_max' ? module.test_5.max_height : module.test_5.height %}
{% widget_block video_player "embed_player"
overrideable=False,
type='scriptV4',
hide_playlist=True,
viral_sharing=False,
embed_button=False,
full_width={{ module.test_5.size_type == 'auto_full_width' }},
width="{{ max_width }}",
height="{{ max_height }}",
player_id="{{ module.test_5.player_id }}"
%}
{% widget_attribute "conversion_asset" %}
{{ module.test_5.conversion_asset|tojson|safe }}
{% end_widget_attribute %}
{% end_widget_block %}
{% endif %}
<p style="color: white; font-family: Lustria; font-size: 30px; border: 2px solid #638869; width: 80%; margin: 0 auto; padding: 40px; margin-top: 20px; margin-bottom: 20px;">
Visual Arts
</p>
</div>
<div class="column" style="background-color: #153357; width: 45%; margin: 0 auto; padding-top: -10px; float: left; max-width: 550px;">
{% if module.test_6.player_id %}
{% set max_width = module.test_6.size_type == 'auto_custom_max' ? module.test_6.max_width : module.test_6.width %}
{% set max_height = module.test_6.size_type == 'auto_custom_max' ? module.test_6.max_height : module.test_6.height %}
{% widget_block video_player "embed_player"
overrideable=False,
type='scriptV4',
hide_playlist=True,
viral_sharing=False,
embed_button=False,
full_width={{ module.test_6.size_type == 'auto_full_width' }},
width="{{ max_width }}",
height="{{ max_height }}",
player_id="{{ module.test_6.player_id }}"
%}
{% widget_attribute "conversion_asset" %}
{{ module.test_6.conversion_asset|tojson|safe }}
{% end_widget_attribute %}
{% end_widget_block %}
{% endif %}
<p style="color: white; font-family: Lustria; font-size: 30px; border: 2px solid #638869; width: 80%; margin: 0 auto; padding: 40px; margin-top: 20px; margin-bottom: 20px;">
Girls Leadership
</p>
</div>
</div>
</div>
<br/>
<br/>
<br/>
and my module.css file looks like this:
header_text {
font-family: "Lustria";
};
header_body {
font-family: "Arimo";
};
/* Responsive layout - makes the columns stack on top of each other instead of next to each other & fits text to screen size */
#media only screen and (max-width: 600px)
.column {
width: 100% !important;
margin-bottom: 10px !important;
}
};
Hubspot seems to be ignoring my media queries... and everything I have tried is not getting it to work. Am I just dumb and missing something?

Top navbar moves when clicking on a specific menu item

Here is the app that I have developed:
http://azeribocorp.pythonanywhere.com/index/
When I click on Search in the menu, the navbar shifts down, I cannot find where the problem is. I want the menu to be always fix on the top of the page. Any help is appreciated.
__base.html:
{% load staticfiles %}
<!DOCTYPE html>
<html lang="en" class="no-js">
<head>
{% block meta_tags %}{% endblock meta_tags%}
<title>
{% block title %}Azeribo Tracking{% endblock title %}
</title>
{% block stylesheets %} {% endblock %}
{% block javascript %} {% endblock javascript %}
{% block extra_head %} {% endblock %}
</head>
<body>
<header class="topnavbar">
{% include 'aztracker/_topnavbar.html' %}
</header>
<div id="main" role="main">
<div class="container">
{% block content %}
{% endblock content %}
</div>
</div> {# /#main #}
<script type='text/javascript' src="{% static 'js/_topnavbar.js' %}"></script>
</body>
</html>
_topnavbar.html
{% load static %}
{% load staticfiles %}
<head>
<link rel="stylesheet" type="text/css" href="{% static 'css/_topnavbar.css' %}">
<link rel="script" type="text/css" href="{% static 'css/_topnavbar.js' %}">
</head>
<!--Top Navigation-->
<nav role="navigation" class="nav">
<ul class="nav-items">
<li class="nav-item">
<span>Home</span>
</li>
<li class="nav-item ">
<span>Track Container</span>
<nav class="submenu">
<ul class="submenu-items">
<li class="submenu-item">Product #1</li>
<li class="submenu-item">Product #2</li>
<li class="submenu-item">Product #3</li>
</ul>
</nav>
</li>
<li class="nav-item">
<span>Search</span>
</li>
<li class="nav-item">
<span>Report</span>
</li>
<li class="nav-item dropdown">
<span>More</span>
<nav class="submenu">
<ul class="submenu-items">
<li class="submenu-item">About</li>
<li class="submenu-item">Contact</li>
<li class="submenu-item"><hr class="submenu-seperator" /></li>
<li class="submenu-item">Support</li>
<li class="submenu-item">FAQs</li>
</ul>
</nav>
</li>
</ul>
</nav>
search_form.html
{% extends 'aztracker/__base.html' %}
{% load staticfiles %}
{% load static %}
{% block stylesheets %}
<link rel="stylesheet" type="text/css" href="{% static 'css/search_form.css' %}">
{% endblock %}
{% block content %}
{% block main_col %}
<body>
<section class="search_section">
<form method="POST" action="/search/">
{% csrf_token %}
<input type="text" placeholder="What are you looking for?" name="search_input_field" id="search_input">
<button id="search_btn">Search</button>
</form>
</section>
</body>
{% endblock main_col %}
{% endblock content %}
_topnavbar.css
* {border:1px black solid;}
.topnavbar {
background-color: rgba(0,100,150,0.6);/*rgba(0,255,150,0.6);/*#3EDC99*/
}
html {
box-sizing: border-box;
}
*,
*:before,
*:after {
box-sizing: inherit;
}
body {
background-color: #3498db;
}
.nav {
width: 550px;
margin: 0 auto 0 auto;
text-align: center;
}
/* Navigation */
.nav {
font-family: Verdana, Georgia, Arial, sans-serif;
font-size: 14px;
}
.nav-items {
padding: 0;
list-style: none;
}
/* color of menu links
span {
color:yellow;
}
*/
.nav-item {
display: inline-block;
margin-right: 25px;
}
.nav-item:last-child {
margin-right: 0;
}
.nav-link,
.nav-link:link,
.nav-link:visited,
.nav-link:active,
.submenu-link,
.submenu-link:link,
.submenu-link:visited,
.submenu-link:active {
display: block;
position: relative;
font-size: 14px;
letter-spacing: 1px;
cursor: pointer;
text-decoration: none;
outline: none;
color:#fff;
}
.nav-link ,
.nav-link:link,
.nav-link:visited,
.nav-link:active {
color: #fff;
font-weight: bold;
}
.nav-link::before {
content: "";
position: absolute;
top: 100%;
left: 0;
width: 100%;
height: 3px;
background: rgba(0,0,0,0.2);
opacity: 0;
-webkit-transform: translate(0, 10px);
transform: translate(0, 10px);
transition: opacity 0.3s ease, transform 0.3s ease;
}
.nav-link:hover::before,
.nav-link:hover::before {
opacity: 1;
-webkit-transform: translate(0, 5px);
transform: translate(0, 5px);
}
.dropdown {
position: relative;
}
.dropdown .nav-link {
padding-right: 15px;
height: 17px;
line-height: 17px;
}
.dropdown .nav-link::after {
content: "";
position:absolute;
top: 6px;
right: 0;
border: 5px solid transparent;
border-top-color: #fff; /*small triangle showing drop down menu*/
}
.submenu {
position: absolute;
top: 100%;
left: 50%;
z-index: 100;
width: 200px;
margin-left: -100px;
background: #fff;
border-radius: 3px;
line-height: 1.46667;
margin-top: -5px;
box-shadow: 0 0 8px rgba(0,0,0,.3);
opacity:0;
-webkit-transform: translate(0, 0) scale(.85);
transform: translate(0, 0)scale(.85);
transition: transform 0.1s ease-out, opacity 0.1s ease-out;
pointer-events: none;
}
.submenu::after,
.submenu::before {
content: "";
position: absolute;
bottom: 100%;
left: 50%;
margin-left: -10px;
border: 10px solid transparent;
height: 0;
}
.submenu::after {
border-bottom-color: #fff;
}
.submenu::before {
margin-left: -13px;
border: 13px solid transparent;
border-bottom-color: rgba(0,0,0,.1);
-webkit-filter:blur(1px);
filter:blur(1px);
}
.submenu-items {
list-style: none;
padding: 10px 0;
}
.submenu-item {
display: block;
text-align: left;
}
.submenu-link,
.submenu-link:link,
.submenu-link:visited,
.submenu-link:active {
color: #3498db;
padding: 10px 20px;
}
.submenu-link:hover {
text-decoration: underline;
}
.submenu-seperator {
height: 0;
margin: 12px 10px;
border-top: 1px solid #eee;
}
.show-submenu .submenu {
opacity: 1;
-webkit-transform: translate(0, 25px) scale(1);
transform: translate(0, 25px) scale(1);
pointer-events: auto;
}
.submenu-link{
color:red;
}
search_form.css
* {border:1px black solid;}
It seems you have a rouge Unicode character in you html.
Inspecting the page source after you click "search" reveals the Unicode character as &#65279. this character is 'ZERO WIDTH NO-BREAK SPACE'.
It will not be seen in you text editor since it parses the characters.
You can try to open your code in Notepad or some texteditor that does not understand Unicode and try to remove it from there.
It is also worth pointing out that your content is displayed in your tag
Foud out about the character from RHSeeger's answer here
Hope this helps!
You are breaking your HTML at some point, I can see some problems in the construction of your templates.
first:
you are including a head tag inside your body tag (_topnavbar.html)
<head>
<link rel="stylesheet" type="text/css" href="{% static 'css/_topnavbar.css' %}">
<link rel="script" type="text/css" href="{% static 'css/_topnavbar.js' %}">
</head>
This should be inside the "extra_head" block, like this (_topnavbar.html):
{% block extra_head %}
<link rel="stylesheet" type="text/css" href="{% static 'css/_topnavbar.css' %}">
<link rel="script" type="text/css" href="{% static 'css/_topnavbar.js' %}">
{% endblock %}
Second:
you are adding an extra body tag inside your body tag (search_form.html):
{% block content %}
{% block main_col %}
<body>
<section class="search_section">
<form method="POST" action="/search/">
{% csrf_token %}
<input type="text" placeholder="What are you looking for?" name="search_input_field" id="search_input">
<button id="search_btn">Search</button>
</form>
</section>
</body>
{% endblock main_col %}
{% endblock content %}
You must delete that body tag.
third:
you are adding a script in a wrong way (_topnavbar.html):
<link rel="script" type="text/css" href="{% static 'css/_topnavbar.js' %}">
you can add it this way:
<script src="{% static 'css/_topnavbar.js' %}" charset="utf-8"></script>
maybe you have more errors, you should review your code line by line and find all the other problems.
I hope this answer works for you, have a good day.
On all children pages (including search), try adding this to your CSS:
body {
margin: auto;
}

Issue with implementing a grid

Within an shopify homepage image grid I'd like to overlay a number of things on top of each image: e.g. on top of the blue shirt 2 text divs (TEXTLINE 1 and TEXTLINE 2)and 1 image. When I add the text lines everything looks as it should:
But, when I include the image (white flower) the parent image is enlarged. TEXTLINE 2 hast the markup cta-text and the image cta-image
This is my CSS:
.tile-group {
position: relative;
overflow: hidden;
.tile { display: none; }
.tile.loaded {
position: absolute;
display: block;
}
img {
width: 100%;
}
a {
display: block;
#include vendor-prefix(transition, opacity 300ms);
&:hover {
opacity: $image-hover-opacity;
}
}
.overlay {
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
text-align: center;
&:before {
content: '';
display: inline-block;
height: 100%;
vertical-align: middle;
margin-left: -5px;
}
.inner {
#extend h4;
color: $home-tile-text-col;
margin: 0;
padding: 0;
display: inline-block;
vertical-align: middle;
width: auto;
padding: 20px 25px;
#if $home-tile-text-bg-col != transparent and $home-tile-text-bg-col != rgba(0,0,0,0) {
background: rgba($home-tile-text-bg-col, $home-tile-text-bg-transparency);
}
.cta-text{
width: 30%;
position: absolute;
font-size:24px;
left:35%;
bottom: 5%;
text-transform: uppercase;
}
.cta-image{
width: 30%;
position: absolute;
left: 35%;
bottom: 10%;
}
}
}
}
<div class="tile">
{% if settings[url_idx] != empty %}<a href="{{ settings[url_idx] | escape }}">{% endif %}
<img src="{% comment %}ly_asset_replace_for_[ filename | asset_url ]_begin{% endcomment %}{% assign ly_asset = filename %}{% include 'ly-asset' with ly_asset %}{{ ly_translation }}{% comment %}ly_asset_replace_end{% endcomment %}" alt="{{ settings[alt_idx] | escape }}" />
{% if settings[overlay_idx] != blank %}
<div class="overlay">
<div class="inner">
{{ settings[overlay_idx] }}
<div class="cta-image">
{{ "lotos.png" | asset_url | img_tag:"CTA Image" }}
</div>
<div class="cta-text">
{{ settings[cta_text] }}
</div>
</div>
</div>
{% endif %}
{% if settings[url_idx] != empty %}</a>{% endif %}
</div>
{% endcapture %}
{% endif %}
{% endfor %}
<section class="border-top section tile-section">
<div class="container">
<div class="tile-group">
{{ img_tiles_html }}
</div>
</div>
</section>
Outputted HTML is here
How can I get the grid behave as in screenshot 1?