Pergunta

I want to make the padding Opaque, but opacity isn't working.

body {
background-image:url(http://i.imgur.com/apKZRmj.png);
font-family:Helvetica;
color:lightgrey;
font-size: 16px;
align:center;
padding: 20px 0;
}

Why won't this work?

Foi útil?

Solução

according to W3 schools

The padding clears an area around the content (inside the border) of an element. The padding is affected by the background color of the element.

so basically it has no color property to make it an opaque or adding some opacity, I think what you need is 'border' ex.

border: 20px solid #000;

JSfiddle: http://jsfiddle.net/bJ2CF/2/

Outras dicas

use background color , The padding clears an area around the content

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top