Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR HTML

html attribute dynamic value

<div style="width: expression(document.body.clientWidth/2+'px'); background-color: yellow">

  <img src="myimage.gif" style="width: 120px; height: 150px; position:absolute; left: expression(document.compatMode=='CSS1Compat'? (document.documentElement.clientWidth-120)/2+'px' : (body.clientWidth-120)/2+'px'); top:
expression(document.compatMode=='CSS1Compat'? (document.documentElement.clientHeight-150)/2+'px' : (body.clientHeight-150)/2+'px');" />

 
PREVIOUS NEXT
Tagged: #html #attribute #dynamic
ADD COMMENT
Topic
Name
3+5 =