PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Friday, July 15, 2022

[FIXED] How can I bring down the featured image a little?

 July 15, 2022     bootstrap-4, css, flask, html, web-deployment     No comments   

Issue

How can I bring down the featured image a little so that it aligns with the title ? This is web page AnyGeeks

This is the code that sets the image.

<div class="container">
<div class="jumbotron jumbotron-fluid mb-3 pl-0 pt-0 pb-0 bg-white position-relative">
    <div class="h-100 tofront">
        <div class="row justify-content-between">
            <div class="col-md-6 pt-6 pb-6 pr-6 align-self-center">
                <p class="text-uppercase font-weight-bold">
                    <a class="text-danger" href="./category.html">{% block category %}{% endblock %}</a>
                </p>
                <h1 class="display-4 secondfont mb-3 font-weight-bold">{% block ptitle %} {% endblock %}</h1>
                <p class="mb-3">
                    {% block desc %} {% endblock %}
                </p>
                <div class="d-flex align-items-center">
                    <img class="rounded-circle" src="{{url_for('static',filename='img/avatar.jpeg')}}" width="70">
                    <small class="ml-2">RahulVk<span class="text-muted d-block">{% block dtt %}{% endblock %}read</span>
                    </small>
                </div>
            </div>
            <div class="col-md-6 pr-0">
                <img src="{% block featuredImage %}{% endblock %}">
            </div>
        </div>
    </div>
</div>

I am using flask as backend. That is why the tags are there.


Solution

I would suggest you to add display flex in your div, and align-items center:

<div class="col-md-6 pr-0 d-flex align-items-center">
     <img src="{% block featuredImage %}{% endblock %}">
</div>

Or you can add some padding top:

<div class="col-md-6 pr-0 pt-4">
     <img src="{% block featuredImage %}{% endblock %}">
</div>


Answered By - flpfar
Answer Checked By - David Marino (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing