faqts : Computers : Programming : Languages : JavaScript : Event handling

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

23 of 52 people (44%) answered Yes
Recently 4 of 10 people (40%) answered Yes

Entry

How do I resize a DIV section by a javascript function ?

Aug 9th, 2001 04:10
Hiroto Sekine, Ronaldo Herdy,


Try this code:
<body OnClick="TheDiv.style.width = '50%'" style="text-align:center">
<div id="TheDiv" style="background-color:red; width:100%"></div>
</body>