-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

user718229
  • 524
  • 6
  • 20
  • 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 Mar 12 '18 at 16:15
  • @Stuart You should post that as an answer instead of a comment. – TylerH Mar 12 '18 at 16:45

2 Answers2

0

Use a pseudo element:

.mobile_menu_bar:after {
  content: 'X';
}
<span class="mobile_menu_bar mobile_menu_bar_toggle"></span>
chinloyal
  • 1,023
  • 14
  • 42
0

You can use the :before pseudo-element

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

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

Studocwho
  • 2,404
  • 3
  • 23
  • 29