Domanda

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?

È stato utile?

Soluzione

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/

Altri suggerimenti

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

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top