-1

Is there a way to add and X to this element via CSS?

<span class="mobile_menu_bar mobile_menu_bar_toggle"></span>

Im not sure where its located in the site, so Id rather just go this route

2
  • You could use a pseudo element, either :before, or :after to insert some content, such as "[x]" using something like mobile_menu_bar_toggle:after { display:inline-block; content: '[x]'; }.... You'd need to of course position it etc, but taht would be where i would start.
    – Stuart
    Commented Mar 12, 2018 at 16:15
  • @Stuart You should post that as an answer instead of a comment.
    – TylerH
    Commented Mar 12, 2018 at 16:45

2 Answers 2

0

You can use the :before pseudo-element

span.mobile_menu_bar:before {
   content: "X";
}

https://jsfiddle.net/8abpgm33/2/

0

Use a pseudo element:

.mobile_menu_bar:after {
  content: 'X';
}
<span class="mobile_menu_bar mobile_menu_bar_toggle"></span>

Not the answer you're looking for? Browse other questions tagged or ask your own question.