inline elements like <span> can’t have a width, whereas block elements like <div> can.

<div> which defaults to block

for the <span> element set display:block

<style type="text/css">

span
{
  display
: inline-block;
  width
: 50px;
}

</style>