Div set to 80%. I want the span to be 100% of that div. How do I do that?

StackOverflow https://stackoverflow.com/questions/22160114

  •  19-10-2022
  •  | 
  •  

Pergunta

So I have a div that's set to 80% width. I then have a span inside of that div, that I would like to set to 100% width of it's outside div. The third span takes up an x% of the second span.

<div>
    <span>
        <span></span>                             
    </span>
</div>

I'm looking to do this for my portfolio website @ vadimp.com

In the 'Services' section, you'll see blue bars indicating my 'percentage' of knowledge for the specific skills (CSS, HTML, Photoshop), I want those blue bars (span class=barBk) to take up the entire width of the div.

I've tried setting barBk to 100% width and display:inline-block but neither worked.

Nenhuma solução correta

Outras dicas

Use some display:inline-block or display:block to give to your inline a width ;-)

You should think about that syntax if your code allows it:

<div class="outer">
    <div class="inner">
        <span></span>
        <!-- something else -->
    </div>
</div>
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top