23.04.2013 Views

javascript

javascript

javascript

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

CHAPTER 8 ■ SCRIPTING CSS<br />

314<br />

Figure 8–2. Just one "" empty string after another<br />

Let’s see what I mean by that cryptic comment. Go ahead and write the members from the previous<br />

sample like so, and click Run, verifying your work with Figure 8–3:<br />

var myStyle = document.getElementById("nike").style;<br />

myStyle.backgroundPosition = "-99px -108px";<br />

myStyle.backgroundImage = "url(images/fuchsia.gif)";<br />

myStyle.left = "200px";<br />

myStyle.top = "30px";

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!