Struggling to create a carousel slide that automatically resizes image, but can't seem to get the inner div containing the images to center within the outer div. Even after trying various CSS properties like text-align:center and margin-left: auto, the alignment remains elusive:
Below is the HTML code within my Django template, including inline CSS for testing purposes before transferring to a CSS file:
<div class="card">
<div class="card-body" style="text-align: center;">
<div id="carouselExampleIndicators3" class="carousel slide" data-ride="carousel" style="height: 100%; cursor: pointer; display: table-row; text-align: center; width: 100%;">
<div style="display: table-cell; vertical-align: middle; width: 100%; border: 0px; text-align: center; height: 100%">
<ol class="carousel-indicators">
{% for image in property.images %}
{% if forloop.counter0 == 0 %}
<li data-target="#carouselExampleIndicators3" data-slide-to="{{ forloop.counter0 }}" class="active"></li>
{% else %}
<li data-target="#carouselExampleIndicators3" data-slide-to="{{ forloop.counter0 }}"></li>
{% endif %}
{% endfor %}
</ol>
<div class="carousel-inner">
{% for image in property.images %}
{% if forloop.counter0 == 0 %}
<div class="carousel-item active">
<img class="d-block w-100" src="{{ image }}" style="width: auto !important; height: auto; max-height: 100%; display: inline">
</div>
{% else %}
<div class="carousel-item">
<img class="d-block w-100" src="{{ image }}" style="width: auto !important; height: auto; max-height: 100%;display: inline">
</div>
{% endif %}
{% endfor %}
</div>
<a class="carousel-control-prev" href="#carouselExampleIndicators3" role="button" data-slide="prev">
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
<span class="sr-only">Previous</span>
</a>
<a class="carousel-control-next" href="#carouselExampleIndicators3" role="button" data-slide="next">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
</div>
</div>
</div>
</div>
After days of being stuck on this issue, any assistance or suggestions would be greatly appreciated!