- This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
Viewing 4 posts - 1 through 4 (of 4 total)
- The forum ‘CSS’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Hi
All seems well, yet the line strike thru the text. What is wrong, could not find out. Can someone?
Appreciate
<h2>kristtee</h2>
HTML
<div class="strike-heading black">
<p>Who We Are</p>
</div>
CSS
.strike-heading{
text-align: center; position: relative; text-transform: uppercase;
}
*{
box-sizing: border-box;
}
div{
display:block;
}
.strike-heading.black:after {
border-bottom: 1px solid #333;
}
.strike-heading:after {
position: absolute; content: ""; left: 0; right:0; top: 50%; bottom: 50%; z-index; -1;
}
.strike-heading.black p {
background: #333;
}
.strike-heading p {
display: table; margin: 0 auto; line-height: 1; padding: 10px 50px; font-size: 13px; color: #fff;
border-radius: 5px; font-family: sans-serif;
}
Probably trying to create a strike ‘font’ look, you know the type of lettering with a clear stripe through it…I’m sure you’ve seen it.
As for the strike
element
MDN
This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it.
There are now s
and del
elements.
MDN – s
– https://developer.mozilla.org/en-US/docs/Web/HTML/Element/s
MDN – del
– https://developer.mozilla.org/en-US/docs/Web/HTML/Element/del
There are now s and del elements.
very true. thanks!