Slant on divs from css border?

Question:

enter image description here

Here is my html:

<div style="margin: 0 auto; margin-top: 25px; text-align: center; padding: 0px;">
    {% for name in client_name %}
        <div class="appointment_data_div">{{ name }}<div>
    {% endfor %}
</div>

css:

.appointment_data_div {
    margin: 0 auto;
    margin-top: 50px;
    width: 600px;
    height: 50px;
    box-shadow: 0px 5px 5px 0 #cccccc;
    border-radius: 15px;
    padding-top: 10px;
    border: 2px solid black;
}

For some reason, as you can see below, the divs are slanted?? I’m using django as my framework.

Asked By: Baked Potato

||

Answers:

Fix end div ?

<div style="margin: 0 auto; margin-top: 25px; text-align: center; padding: 0px;">
  {% for name in client_name %}
  <div class="appointment_data_div">{{ name }}</div>
  {% endfor %}
</div>
Answered By: Lucas Grugru

if your div’s are nested, you can use this:

// in your css
div .appointment_data_div {
  padding-left: 15px;
}
Answered By: Maxim Danilov
Categories: questions Tags: , , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.