faqts : Computers : Programming : Languages : JavaScript : Document

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

16 of 26 people (62%) answered Yes
Recently 4 of 10 people (40%) answered Yes

Entry

How to exactly centering a object in the client view
How to specify an element's location with dynamic property (IE5)?
How can I place button object exactly at the center (IE5)?

May 18th, 2000 06:53
Thor Larholm, Hiroto Sekine, Martin Honnen, http://www.all.co.nz/mu2iaf/checkies.htm


with IE5+: The following code enable any object exact centering 
horizontally.
<div style="left:expression((document.body.clientWidth -
BT.clientWidth)/2);">
<input type='button' ID="BT" value='change color' 
OnClick=javascript:this.style.color="red"' /></div>