0

I have such HTML+CSS code:

.top {
  padding-right: 40px;
}

.w {
  text-decoration: none;
  font-size: 34px;
  letter-spacing: 3px;
  padding-left: 40px;
}

.w-right {
  float: right;
  letter-spacing: 4px;
}
<div class="top">
  <a class="w" href="//www.site.com/">www.Site.Com</a>
  <div class="w-right">sitecom corp</div>
</div>

Question: how to add indentations from above and below, so that the text was in one horizontal line?

Temani Afif
  • 245,468
  • 26
  • 309
  • 415
Vytas P.
  • 953
  • 4
  • 12
  • 17
  • @TermaniAfif Not too sure it is a duplicate. If vertical centering is involved, horizontal alignment is too. Float is surely in the way, but could be kept . examples how it could keep both alignments https://codepen.io/gc-nomade/pen/vrrZLy ;) – G-Cyrillus Jun 23 '18 at 12:36
  • @G-Cyr but your example make the duplicate trivial and obovious :) ...for example you used the line-height technique which is the first answer in the first duplicate question I added ;) .. and am sure at 1000% that the needed answer is available in the 50+ answers of the above questions. – Temani Afif Jun 23 '18 at 13:03
  • @TemaniAfif line-height is an oldish technique and breaks once content wraps into few lines ;) . text-align-last or flex are efficient where line-height is effective untill it breaks .Actually, the use of float nowdays is bothering me for this kind of layout even if that is not the question but one reason for the misalignment . – G-Cyrillus Jun 23 '18 at 13:35

0 Answers0