Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Problem with text-decoration: underline in WebKit Re: Problem with text-decoration: underline in WebKit

#54436
TheLeggett
Member

You could use border-bottom instead to create a thicker underline. It would be a bit more tricky to add a drop shadow to the border though (I’m thinking you might be able to make something work with box shadow).

Here’s one way you could do it with pseudo classes:

h1 {
display:inline-block;
text-shadow:1px 3px 5px #ccc;
font-size:36px;
}
h1::after {
display:block;
height:5px;
background:#000;
content:'';
width:100%;
clear:both;
box-shadow:1px 3px 5px #ccc;
}