I have page Job and element with logo and button apply. I added to this element position: fixed
and when I scroll page I have this element STICKY and when I scroll to footer the logo and button overlaps with the footer. Can I change it somehow to make this element (logo and button) turn off position: fixed
at the footer or other div below? I want use position:fixed
only next to content - card-text
(which is on the left side my element).
element {
margin: 0 auto;
margin-top: 0px;
display: block;
margin-top: 15px;
}
img#companylogo {
position: fixed;
}
img#companylogo {
position: fixed;
}
img {
vertical-align: middle;
border-style: none;
}
<div class="row" >
<div class="col-xl-8">
<div class="card shadow p-3 mb-5 bg-white rounded" style="max-width: 50rem;margin-left: auto; margin-right: auto;">
<div class="card-body">
<b>agreement</b>
<p class="card-text"><%= @job.job_type %></p>
<b>description</b>
<p class="card-text"><%=raw @job.description %></p>
<b>skills</b>
<p class="card-text"> <%=raw @job.requirements %></p>
<b>expiration date offer</b>
<p> <%= @job.data %> <%= @job.hour %></p>
:
</div>
</div>
</div>
<div class="col-xl-4">
<% unless @job.avatar_url.nil? %><%= image_tag @job.avatar_url(:display), style: "margin: 0 auto; display: block; margin-top: 15px", id: "companylogo" %><% end %>
<%= link_to @job.url do %>
<% end %>
<%= link_to 'Apply', @job.url, class: "btn btn-lg btn-block pb_btn-pill btn-shadow-blue .margin_desktop", style: "max-width: 200px ; background: linear-gradient(to right, #1488cc, #2b32b2); color: white !important; border: 0px;margin: 0 auto; display: block; margin-top: 15px; margin-bottom: 15px"%>
</div>
</body>