Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I make Padding Non-Transparent?

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?

like image 384
kookman98 Avatar asked Jun 07 '26 12:06

kookman98


1 Answers

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/

like image 189
Joe Marie Avatar answered Jun 10 '26 11:06

Joe Marie



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!