0

The pattern has before content inject into the page, but it's not visible can you please suggest what is the issue?

.aloha { font-family: Medium; font-size: 74px; color: green; position: relative; display: inline-block; margin: 0; height: 85px; } .aloha:before { width: 100%; height: 85px; color: red; content: attr(data-text); display: block; }
 <h1 date-text='TEXT' class='aloha'>TEXT</h1>

1
  • Since this is a simple typo I recommend to delete this question as it has no value to future users Commented Jun 2, 2017 at 15:06

1 Answer 1

3

There is a typo in your HTML. Replace date-text with data-text on your <h1> element:

.aloha { font-family: Medium; font-size: 74px; color: green; position: relative; display: inline-block; margin: 0; height: 85px; } .aloha:before { width: 100%; height: 85px; color: red; content: attr(data-text); display: block; }
<h1 data-text='TEXT' class='aloha'>TEXT</h1>

Sign up to request clarification or add additional context in comments.

4 Comments

Flag to close as off-topic due to a typo
Thank you Sebastian, will pay more attention next time :)
@j08691 - just for info: is in such a case an answer ok or should I only flag and comment? (I flagged)
You should always flag typo questions for closure. Answering is optional, but can easily be done as a comment.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.