user17541419
user17541419

Reputation:

Underscore permeates

I want to add a colored underscore to my title, now everything works, but when there is a word in brackets in the title, this underline is interrupted. Can I somehow do so that it is not interrupted under any circumstances?

.title {
  text-decoration: underline 8px solid blue;
}
<h2 class="title">some title (zwe)</h2>

Upvotes: 1

Views: 39

Answers (2)

kirjosieppo
kirjosieppo

Reputation: 647

This seems to work.

.title {
  text-decoration: underline 8px solid blue;
  text-underline-position: under;
}
<h2 class="title">some title (zwe)</h2>

Upvotes: 0

Justinas
Justinas

Reputation: 43479

Use border-bottom instead

.title {
  display: inline-block;
  border-bottom: 8px solid blue;
}
<h2 class="title">some title (zwe)</h2>

Upvotes: 1

Related Questions