Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Bee Priola
3,922 PointsHow to add ::before in HTML?
<!DOCTYPE html>
<html lang="en-US">
<head> <meta charset="UTF-8"> <meta name="viewport" content="">
<title>Thai Massage</title>
<link rel="stylesheet" href="css/style.css">
<link rel="" href="//fonts.">
</head>
<body> <header> <span class="sub">Tel: (646) 330-1917</span><br> <span class="title"> Culture...Traditional....Spiritual</span> <h1>Thai Massage</h1>
<div class="nav-bar text-center mb-xs-0"> ==$0
<div class="container">
::before
<div class="text-center">
<ul id="main-menu" class="menu-primary inline-block mb-xs-16">
<li class="top-link hidden-xs">
<a href="#top" class="inner-link">
<i class="ti-arrow-up">
::before
</i>
" Top"
</a>
</li>
<li> <a href="#about" class="inner-link">ABOUT</a></li>
<li> <a href="#massage" class="inner-link">MASSAGE MENU</a></li>
<li> <a href="#tips" class="inner-link">BEAUTY TIPS</a></li>
<li> <a href="#contact" class="inner-link">CONTACT</a></li>
</ul>
</div>
</header>
1 Answer
Kerry Smyth
3,921 PointsYou need to put :before in your CSS file. Like:
some-element:before
{
content:"Some Content";
/*OTHER STYLES*/
}