![]() |
help me understand short notation.
for example, this line of code
Code:
body {Code:
body {also the thing thats not making sense to me is for example this template: [image]http://i2.sitepoint.com/graphics/image031.png[/image] which can be found here: Breaking Out of the Box With CSS Layouts [CSS Tutorials] the header image with the swirly whose id is called header. the code that is holding it up there is written like this Code:
background: #966 url(header.gif) bottom no-repeat;Code:
background: #333 url(footer.gif) top no-repeat; |
I have no idea what the 0 and 100% do never seen it before, however the background:#333 url(footer.gif) top no-repeat; just means what it says add the background image dont repeat it and position it at the top of that div. then apply the dark grey every where the image is not at.
The reason the footer has top and the header has bottom is so that the layout stays together. You want the header right against the content so you place it on the bottom and you want the footer against the content so you place it at the top. |
Try take a look at the MSDN page, it has all of background's arguments:
background Property (A, ADDRESS, B, ...) |
Css
Hi there,
The short hand for the background like this: body{ background: #ccc url(/img/pic.png) top left no-repeat; } the 100% is for the bakground-position: 100% it can also be specified in pixels (10px 200px) this link does a better job explaining than i can.. Efficient CSS with shorthand properties | 456 Berea Street hope this helps.. AK |
thank you all for your replys this Efficient CSS with shorthand properties | 456 Berea Street is a great website!
|
| All times are GMT. The time now is 01:44 AM. |
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0