Monday, December 17, 2012

Monday 12-17: day3 in HTML design part 4

OK, now it's time to get serious: make borders change is OK, but what about making this DIV actually DO something? All righty then, since you asked so insistently, let's make it happen!

Try this on for size:

A) Click at the end of ONMOUSEOUT  = "this.style.border = 'solid'  "

in your FIRST DIV container

B) Hit the "Return" key

C) then type in this code:

ONCLICK  = "window.location = 'http://www.thinkgeek.com'  "

D) Again, I cannot emphasize enough, be VERY careful about where you type the single quotes versus the double quotes, as it makes a big difference

E) SAVE your code, REFRESH your browser, then see what happens when you click that DIV. Do you go to another website?

F) You might want to change the text of that DIV to the name of the website you're heading to. You might also want to add this code:

text-align : center

into the style of your DIVs. It'll make the text inside these DIVs line up nice and neat :-)

G) Apply similar changes to your other two DIVs. See which websites you can get to using this method

cheers,
Mr. L


No comments:

Post a Comment

Note: Only a member of this blog may post a comment.