Ich bin mit meinem Verstand auf dieses Ende. In Chrome ändert sich die Stärke des Lineals abhängig davon, wie viele Textzeilen darunter liegen. In Firefox und IE bleibt es immer 1px. Bild unten und hier eine Geige (Besuch mit Chrome, das Problem zu sehen) https://jsfiddle.net/Lh4qg7zc/Warum ändert sich die 1px <hr> Erscheinung?
<div class="project-card">
<div class="project-caption">
<div class="pc-name">beloved homes</div>
<hr class="project-caption-ruler">
<div class="pc-type">Book</div>
<div class="pc-task">International editing, verbal identity, copy adaptation</div>
</div>
</div>
<div class="project-card">
<div class="project-caption">
<div class="pc-name">beloved homes</div>
<hr class="project-caption-ruler">
<div class="pc-type">Book</div>
<div class="pc-task">International editing, verbal identity, copy adaptation ... and an extra line...</div>
</div>
</div>
CSS:
.project-card {
position: relative;
background-color:brown;
text-align: center;
width: 380px;
height: 250px;
margin-bottom: 2%;
}
.project-caption {
color: white;
font-size: 0.8rem;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 90%;
}
.pc-name {
text-transform: uppercase;
padding-bottom: 5px;
}
.project-caption-ruler {
width: 166px;
border:0;
border-top:1px solid white;
}
.pc-type,
.pc-task {
font-style: italic;
}
.pc-task {
margin-top: 3px;
}
Zeigt das Chrome-Entwickler-Tool (glaube ich, drücken Sie F12) irgendwelche tatsächlichen Attributänderungen an dem Element? – Martin
nicht, dass ich sehen kann, "Berechnet CSS" ist für beide Instanzen identisch – pastic