Home > Net >  Slant on divs from css border?
Slant on divs from css border?

Time:09-19

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 >{{ 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.

CodePudding user response:

Fix end div ?

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

CodePudding user response:

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

// in your css
div .appointment_data_div {
  padding-left: 15px;
}
  • Related