understand CSS this snippet (Full Version)

All Forums >> [Web Development] >> Cascading Style Sheets



Message


seth -> understand CSS this snippet (6/8/2007 13:48:04)

body {
background-color: #330000;
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
background-image: url();
background-repeat: repeat;
}


Hi What's background-image: url();

Is url() a JavaSctip function? will something like this work? Thanks for help me understand this.

Cheers




coreybryant -> RE: understand CSS this snippet (6/8/2007 14:01:30)

It's for you to add an URL to the background image and the next function will make sure that it repeats (which background images do anyway).




rdouglass -> RE: understand CSS this snippet (6/8/2007 15:20:32)

The one thing I might add is with images and external style sheets, the image path is relative to the style sheet and not the page it's used on. So if you have your CSS in it's own directory, the image line would look something like this:

background-image: url('../images/myimage.jpg');

I wasted quite a bit of time on that one once. [:'(] Hope you can avoid that mistake.[;)]




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
7.617188E-02