{"id":107,"date":"2006-05-08T18:37:02","date_gmt":"2006-05-08T16:37:02","guid":{"rendered":"https:\/\/www.moonbug.org\/log\/2006\/05\/08\/the-case-of-the-css-background-image\/"},"modified":"2006-05-09T15:04:48","modified_gmt":"2006-05-09T13:04:48","slug":"the-case-of-the-css-background-image","status":"publish","type":"post","link":"https:\/\/www.moonbug.org\/log\/2006\/05\/08\/the-case-of-the-css-background-image\/","title":{"rendered":"The Case Of The CSS Background Image"},"content":{"rendered":"<p>So Roberto <a href=\"http:\/\/mividaesunsafari.blogspot.com\/2006\/05\/renovacion-y-cambio.html\">redesigns his blog<\/a> but mentions in his comments he can&#8217;t figure out how to give the page a background image. <em>Pero es facil<\/em> &#8212; a bit of <acronym title=\"Cascading Style Sheets\">CSS<\/acronym> to the rescue! The rule itself looks something like this (mind the wrap):<\/p>\n<p><code><br \/>\nbody {<br \/>\nbackground: #000 url(http:\/\/example.com\/images\/background.gif) top left no-repeat;<br \/>\n}<br \/>\n<\/code><\/p>\n<p>Add the above code to your stylesheet and it will position your background image, guess what, top left of the page, and that&#8217;s it. Probably not what you want, no? How about a horizontal repeat? Just replace &#8220;no-repeat&#8221; with &#8220;repeat-x&#8221;. Vertical repeat: &#8220;repeat-y&#8221;. Repeat all over the page: just get rid of &#8220;top left no-repeat&#8221; altogether. Note that an absolute url is used to point to the image (as opposed to just &#8220;images\/background.gif&#8221;). It assures that the image will be found no matter the subdirectory in which your stylesheet is located.<\/p>\n<p>Now, having never used <a href=\"http:\/\/blogspot.com\/\">blogspot<\/a>, I&#8217;m not sure if you can host images there, so I will leave that for you to find out&#8230;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>So Roberto redesigns his blog but mentions in his comments he can&#8217;t figure out how to give the page a background image. Pero es facil &#8212; a bit of CSS to the rescue! The rule itself looks something like this (mind the wrap): body { background: #000 url(http:\/\/example.com\/images\/background.gif) top left no-repeat; } Add the above [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true},"categories":[6],"tags":[],"jetpack_featured_media_url":"","jetpack_publicize_connections":[],"_links":{"self":[{"href":"https:\/\/www.moonbug.org\/log\/wp-json\/wp\/v2\/posts\/107"}],"collection":[{"href":"https:\/\/www.moonbug.org\/log\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.moonbug.org\/log\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.moonbug.org\/log\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.moonbug.org\/log\/wp-json\/wp\/v2\/comments?post=107"}],"version-history":[{"count":0,"href":"https:\/\/www.moonbug.org\/log\/wp-json\/wp\/v2\/posts\/107\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.moonbug.org\/log\/wp-json\/wp\/v2\/media?parent=107"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.moonbug.org\/log\/wp-json\/wp\/v2\/categories?post=107"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.moonbug.org\/log\/wp-json\/wp\/v2\/tags?post=107"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}