Grey_Wolf Posted October 3, 2007 Report Share Posted October 3, 2007 (edited) Kaa Noteikt elementa div, table utt.. (bloka) izmeru (platums/augstums) pikseljos ? ------- document.getElementById('id').style.width atgriezj elementa vertibu kaada ir noraadiita .. teiksim, ja noraada width:100% tad taa arii tiek atgriests -->100% un ja width vispar nav noraadiits tad neko arii netgriezj.... --- Vajadzetu dabuut tekosho izmeru PIKSELJOS ... edit: zinu ka Prottotype to maak, bet soreiz taas ir garaam .... Velams lai arii nebuutu kaads specefisks brauzera (teiksim tikai FF ) risinajums... Edited October 3, 2007 by Grey_Wolf Link to post Share on other sites
andrisp Posted October 3, 2007 Report Share Posted October 3, 2007 Šis tev varbūt palīdzēs: http://www.csscripting.com/css-multi-colum...idth-height.php Link to post Share on other sites
PheliX Posted October 3, 2007 Report Share Posted October 3, 2007 http://www.quirksmode.org/dom/getstyles.html Link to post Share on other sites
Grey_Wolf Posted October 3, 2007 Author Report Share Posted October 3, 2007 PheliX --> paldies... Biju iedomajies par offsetWidth --> pamegjinaaju bet nenostraadaja , izraadas bija neuzmanibas kljuuda :( width ar mazo burtu --> stulbais JS ..... Link to post Share on other sites
bubu Posted October 3, 2007 Report Share Posted October 3, 2007 JS debugeris jālieto. Link to post Share on other sites
Grey_Wolf Posted October 3, 2007 Author Report Share Posted October 3, 2007 (edited) bubu --> Doma nelietoju ;) uz FF FireBugs neko neuzradija :( tik atgrieza kaa Undefined vertiibu ... --- Edit : sho problemu meklejot uzduros intresanta f-jai.. varbuut kaadam noder..... ---------- function alertSize() { var myWidth = 0, myHeight = 0; if( typeof( window.innerWidth ) == 'number' ) { //Non-IE myWidth = window.innerWidth; myHeight = window.innerHeight; } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) { //IE 6+ in 'standards compliant mode' myWidth = document.documentElement.clientWidth; myHeight = document.documentElement.clientHeight; } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) { //IE 4 compatible myWidth = document.body.clientWidth; myHeight = document.body.clientHeight; } window.alert( 'Width = ' + myWidth ); window.alert( 'Height = ' + myHeight ); } 1. atgriezj realo loga izmeru (cik ir redzams) 2. mazliet parveidojot var dabuut elementa izmeru .... ------------ Edited October 3, 2007 by Grey_Wolf Link to post Share on other sites
Recommended Posts