Partager via


About Creating a Dynamic Inline Element

Although <DIV> and <SPAN> tags are usually used for page layout purposes, you can also use them to make unique links. For example, we created the following dynamic link for the topic links on our home pages:

function liteGo(spNo){
spNo.style.background="#00cc33";
spNo.style.color="#FFFFFF";
}
function liteOff(spNo){
spNo.style.background="transparent";
spNo.style.color="#000000";
}

There are three steps to creating a dynamic element:

  1. Insert the tag for an instance of the section
  2. Insert the JavaScript code
  3. Update your style sheet to reflect the new section

Note

When you use the <SPAN> tag inline with text, including other items in the span (such as graphics) limits the span's minimum height to 12 points.

 

Create Dynamic Links