This may be a very stupid question, but how do I stop css from overlapping when I try to increase the font size?
@import url(https://fonts.googleapis.com/css?family=Fjalla+One); html{ height: 100%; } body{ font-family: 'Fjalla One', sans-serif; background: #2C3E50; /* fallback for old browsers */ background: -webkit-linear-gradient(to top, #4CA1AF, #2C3E50); /* Chrome 10-25, Safari 5.1-6 */ background: linear-gradient(to top, #4CA1AF, #2C3E50); /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */ } .container{ margin: auto; } h1{ text-transform: uppercase; font-size: 60px; line-height: 47px; letter-spacing: 2px; text-shadow: #533d4a 1px 1px, #533d4a 2px 2px, #533d4a 3px 3px, #533d4a 4px 4px; text-align: center; } .title{ transform: translateX(-50%) rotate(-5deg); display: block; margin-left:50%; }
<body> <!--Titel--> <section class="container"> <h1> <br /> <span class="title" > <label style="color:#e55643;">Burger</label><label style="color:#2b9f5e;">school</label> </span> <span class="title" style="color:#f1c83c;">afspraken</span> </h1> </section> </body>
Thanks for the help for the help. I just started like that again, maybe this is a very stupid question.
You need to adjust line-height, for example. set it as font-sizein 60px. The text overlaps if it line-heightis small for the given font-size.
line-height
font-size
60px
@import url(https://fonts.googleapis.com/css?family=Fjalla+One); html { height: 100%; } body { font-family: 'Fjalla One', sans-serif; background: #2C3E50; /* fallback for old browsers */ background: -webkit-linear-gradient(to top, #4CA1AF, #2C3E50); /* Chrome 10-25, Safari 5.1-6 */ background: linear-gradient(to top, #4CA1AF, #2C3E50); /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */ } .container { margin: auto; } h1 { text-transform: uppercase; font-size: 60px; line-height: 60px; letter-spacing: 2px; text-shadow: #533d4a 1px 1px, #533d4a 2px 2px, #533d4a 3px 3px, #533d4a 4px 4px; text-align: center; } .title { transform: translateX(-50%) rotate(-5deg); display: block; margin-left: 50%; }
<section class="container"> <h1> <span class="title"> <label style="color:#e55643;">Burger</label><label style="color:#2b9f5e;">school</label> </span> <span class="title" style="color:#f1c83c;">afspraken</span> </h1> </section>
You have installed in your code line-height : 47px;, but you are trying to increase the font size even more than the line height.
line-height : 47px;
font-size: 60px; line-height: 47px; <!--This is what causing the problem, increase it as much as you increase the font size-->
For instance:
font-size: 60px; line-height: 60px; <!--It will do the job-->
line-height:47px;
Source: https://habr.com/ru/post/1674996/More articles:Regular expression only returns 1 match - vbaMultiprocessor pool initializer not working - pythonLeft and right float bigger than div wrapper? - htmlIs the use of static width in a flexible container idiomatic? - cssУправление фоновыми заданиями в сценариях PowerShell 4 - powershellhttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1674997/the-local-repository-is-out-of-date-make-sure-all-changes-have-been-pulled-from-the-remote-repository-and-try-again&usg=ALkJrhi8T2px4ZQbTYr5jdK7yPB6He_6iwpython pandas rename multiple column headers in the same way - pythonVBA: disabling Listbox while running macro - vbaKeras: What is the result of the predict_generator function? - pythonDocker Container Memory Limit - dockerAll Articles