How to make span width to be maximum using CSS?

If you want the items on the same line with the full width taken up you could do this.You can achieve this with the example below:

p {
    background-color: #aaa;
}

strong {
    float: left;    
}

span {
    display: block;
    background-color: #777;
    margin-left: 40px;
}

But a better alternative would be to get the background-color run from the parent element.