• 카테고리

    질문 & 답변
  • 세부 분야

    풀스택

  • 해결 여부

    미해결

안녕하세요 container 의 a속성을 수정하는 부분질문이있습니다!

22.03.13 14:02 작성 조회수 103

0

 

강의 내용중에 list 파일중에 

 

.container a {
width: 45%
max-width: 250px;
}

를 넣어도 a 태그가 적용이 안되는거 같은데...

( img size의 max-width가 안먹히는거 같아요!)

 

이런경우는 어느 부분을 확인해야할까요? ㅠㅠ

 

(img 의 width를 수정하면 줄어들긴합니다..)

 

아래는 전체 소스입니다...

<style>

.container {
padding: 0;
margin: 0, auto;
}

.container a {
width: 45%
max-width: 250px;
}

.container div {
display: flex;
justify-content: center;
align-items: center;
border-radius: 1rem;
}

.container img {
width:100%;
border-radius:1rem;
}
</style>

{% if article_list %}
<div class="container">

{% for article in article_list %}
<a href="{% url 'articleapp:detail' pk=article.pk %}">
{% include 'snippets/card.html' with article=article %}
</a>
{% endfor %}

</div>
<script src="{% static 'js/magicgrid.js' %}"> </script>
{% else %}

 

 

 

 

답변 0

답변을 작성해보세요.

답변을 기다리고 있는 질문이에요.
첫번째 답변을 남겨보세요!