Heya guys, could someone maybe explain to me what the transparent property does in this code snippet below. I really don't understand since the image is not transparent nor a background is shown. I have seen it at a lot of sites but don't have a clue.
thx in advance.
Johny
.lalala{ background: url("../images/bg.gif") repeat-x scroll left top transparent !important }
transparent is the background
transparent is the background color.
So instead of using, say, #000000, you can use transparent and that element won't have a background color.
It's usually used for elements that have been specified to have a bg color at some point and with specificity you are negating that color so that way transparent GIF and PNG files can be truly transparent instead of still having a background color from the element.
I see, but isn't it a bit odd
I see, but isn't it a bit odd do use this extra piece of code for non-transparant images?
I see it so often and am always thinking why on earth would they do that.
Thx m8 for your wickedly quick response! 
It's not for images; it's for
It's not for images; it's for background-color as Deuce already said. The code you've posted is the shorthand for combining
background-attachment
background-color
background-image
background-position
background-repeat
So no, it's not odd - it's for background-color, not background-image.
ok cool ty m8 for the
ok cool ty m8 for the response I am gonna check it out.
I think i now understand what you mean. If i get the box-model explanation of the w3schools.
the padding around the element is affected by the background. Almost sure this has something to do with it. but I am gonna test it out so I can fully master this weird browser depended language. 
I really appreciate the help
Thx!!
epictreeclimber wrote: If i
If i get the box-model explanation of the w3schools.
the padding around the element
Padding is not "around" the element, it is within the element.
Most people, when the start CSS, seem to assume what you believe about padding, and I did too. But it's a mistaken assumption.
Margin is Around. Padding is
Margin is Around.
Padding is Within.
Add a Border to an img and you will see the different really easily.
Thanks guys!!
Thanks guys!!



