the sun's not yellow it is chicken

Category: Web (Page 3 of 5)

Portfolio

Hell freezes over: a post with no graphics! Just wanted to let you know I’ve put up a tiny online portfolio of my work, as well as an “about” page. And there was much rejoicing!

The Case Of The CSS Background Image

So Roberto redesigns his blog but mentions in his comments he can’t figure out how to give the page a background image. Pero es facil — 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 code to your stylesheet and it will position your background image, guess what, top left of the page, and that’s it. Probably not what you want, no? How about a horizontal repeat? Just replace “no-repeat” with “repeat-x”. Vertical repeat: “repeat-y”. Repeat all over the page: just get rid of “top left no-repeat” altogether. Note that an absolute url is used to point to the image (as opposed to just “images/background.gif”). It assures that the image will be found no matter the subdirectory in which your stylesheet is located.

Now, having never used blogspot, I’m not sure if you can host images there, so I will leave that for you to find out…

« Older posts Newer posts »

© 2025 moonbug.org

Theme by Anders NorenUp ↑