Frage

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?

War es hilfreich?

Lösung

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/

Andere Tipps

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

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top