This commit is contained in:
@@ -47,13 +47,13 @@
|
||||
}
|
||||
|
||||
textElement = document.getElementById("lowerpc")
|
||||
console.log(textElement, "textel")
|
||||
|
||||
containerWidth = container.offsetWidth
|
||||
textWidth = textElement.offsetWidth
|
||||
|
||||
characterCount = textElement.textContent.length - 1
|
||||
spaceNeeded = containerWidth - textWidth
|
||||
console.log(characterCount, spaceNeeded, containerWidth)
|
||||
|
||||
if (characterCount > 0 && spaceNeeded > 0) {
|
||||
const letterSpacing = spaceNeeded / characterCount
|
||||
textElement.style.letterSpacing = `${letterSpacing}px`
|
||||
@@ -101,8 +101,8 @@
|
||||
<img src="/media/MädchenmitBlume.svg" alt="logo" />
|
||||
</button>
|
||||
<div class="logo-text" id="logo-containerpc">
|
||||
<p id="upperpc">all kids</p>
|
||||
<p id="lowerpc">SO GÜNSTIG WIE NACHHALTIG</p>
|
||||
<div id="upperpc">all kids</div>
|
||||
<div id="lowerpc">SO GÜNSTIG WIE NACHHALTIG</div>
|
||||
</div>
|
||||
<button class="img-logo-container">
|
||||
<img src="/media/Radfahrer.svg" alt="logo" />
|
||||
|
||||
Reference in New Issue
Block a user