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 trialgregsmith5
32,615 PointsHow would I get two adjacent orange dots?
Pretend that I'm totally bonkers and want to have not just one coral block before the h1 element, but TWO. Is there a way to do this via CSS? I tried h1::before::before
, but that didn't work.
Not a pressing matter, just curious.
2 Answers
Jeff Lemay
14,268 PointsYou could use :before and :after with absolute positioning.
h1 {
position:relative;
padding-left: 20px; /* padding left so we have room for our dots */
}
h1:before {
content:"\2219";
position: absolute;
top: 0;
left: 0;
color:coral;
}
h1:after {
content:"\2219";
position: absolute;
top: 0;
left: 10px;
color:coral;
}
Something along those lines
makishamaier
3,070 PointsSomething like:
h1::before {
display: inline-block;
content: "\B7 \B7";
font-size: 4em;
color:coral;
margin: 0 10px;
}
will give you circular bullet points of a similar size, but the positioning would still require tweaking.
Jeff Lemay
14,268 PointsJeff Lemay
14,268 PointsBullet point is content:"\2219";
Edited answer to reflect.