{"id":38968,"date":"2026-02-11T17:40:37","date_gmt":"2026-02-11T14:40:37","guid":{"rendered":"https:\/\/fatihsoysal.com\/blog\/?p=38968"},"modified":"2026-02-11T17:40:37","modified_gmt":"2026-02-11T14:40:37","slug":"javascriptte-clientwidth-ve-clientheight-web-sayfasi-boyutlandirma-ve-duzenlemede-derinlemesine-bir-kilavuz","status":"publish","type":"post","link":"https:\/\/fatihsoysal.com\/blog\/javascriptte-clientwidth-ve-clientheight-web-sayfasi-boyutlandirma-ve-duzenlemede-derinlemesine-bir-kilavuz\/","title":{"rendered":"JavaScript&#8217;te clientWidth ve clientHeight: Web Sayfas\u0131 Boyutland\u0131rma ve D\u00fczenlemede Derinlemesine Bir K\u0131lavuz"},"content":{"rendered":"<p><body><\/p>\n<h2>JavaScript&#8217;te clientWidth ve clientHeight: Web Sayfas\u0131 Boyutland\u0131rma ve D\u00fczenlemede Derinlemesine Bir K\u0131lavuz<\/h2>\n<p>Web geli\u015ftirmenin temel ta\u015flar\u0131ndan biri, kullan\u0131c\u0131 aray\u00fczlerinin do\u011fru bir \u015fekilde boyutland\u0131r\u0131lmas\u0131 ve d\u00fczenlenmesidir. Bir web sayfas\u0131ndaki \u00f6\u011felerin boyutlar\u0131n\u0131 ve konumlar\u0131n\u0131 do\u011fru bir \u015fekilde anlamak, duyarl\u0131 tasar\u0131mlar olu\u015fturmak, dinamik i\u00e7erikleri y\u00f6netmek ve kullan\u0131c\u0131 deneyimini optimize etmek i\u00e7in kritik \u00f6neme sahiptir. JavaScript, bu t\u00fcr \u00f6l\u00e7\u00fcmleri yapmak i\u00e7in \u00e7e\u015fitli \u00f6zellikler sunar ve <code>clientWidth<\/code> ile <code>clientHeight<\/code> bu \u00f6zellikler aras\u0131nda en s\u0131k kullan\u0131lanlardan ikisidir. Bu makale, <code>clientWidth<\/code> ve <code>clientHeight<\/code> \u00f6zelliklerinin ne anlama geldi\u011fini, nas\u0131l \u00e7al\u0131\u015ft\u0131klar\u0131n\u0131, di\u011fer benzer boyutland\u0131rma \u00f6zelliklerinden farklar\u0131n\u0131 ve pratik uygulamalar\u0131n\u0131 derinlemesine inceleyecektir.<\/p>\n<h3>clientWidth ve clientHeight Nedir?<\/h3>\n<p><code>clientWidth<\/code> ve <code>clientHeight<\/code>, bir HTML eleman\u0131n\u0131n i\u00e7eri\u011finin ve dolgu (padding) alan\u0131n\u0131n, kenarl\u0131k (border) ve kayd\u0131rma \u00e7ubuklar\u0131 (scrollbar) hari\u00e7, i\u00e7 geni\u015fli\u011fini ve y\u00fcksekli\u011fini temsil eden sadece okunabilir (read-only) \u00f6zelliklerdir. Bu \u00f6zellikler, eleman\u0131n g\u00f6rsel olarak kullan\u0131labilir alan\u0131n\u0131 \u00f6l\u00e7mek i\u00e7in tasarlanm\u0131\u015ft\u0131r.<\/p>\n<p>Bir DOM (Belge Nesne Modeli) eleman\u0131 \u00fczerinde \u00e7a\u011fr\u0131ld\u0131\u011f\u0131nda:<br \/>\n*   <strong><code>clientWidth<\/code><\/strong>: Eleman\u0131n i\u00e7eri\u011finin ve sol ile sa\u011f dolgusunun toplam geni\u015fli\u011fini d\u00f6nd\u00fcr\u00fcr. E\u011fer eleman\u0131n i\u00e7eri\u011fi kayd\u0131rma \u00e7ubuklar\u0131na neden oluyorsa, bu kayd\u0131rma \u00e7ubu\u011funun geni\u015fli\u011fi <code>clientWidth<\/code> de\u011ferine dahil edilmez.<br \/>\n*   <strong><code>clientHeight<\/code><\/strong>: Eleman\u0131n i\u00e7eri\u011finin ve \u00fcst ile alt dolgusunun toplam y\u00fcksekli\u011fini d\u00f6nd\u00fcr\u00fcr. Benzer \u015fekilde, e\u011fer eleman\u0131n i\u00e7eri\u011fi kayd\u0131rma \u00e7ubuklar\u0131na neden oluyorsa, bu kayd\u0131rma \u00e7ubu\u011funun y\u00fcksekli\u011fi <code>clientHeight<\/code> de\u011ferine dahil edilmez.<\/p>\n<p>Bu \u00f6zellikler, \u00f6zellikle bir eleman\u0131n i\u00e7inde metin veya di\u011fer \u00f6\u011felerin yerle\u015febilece\u011fi &#8220;g\u00f6r\u00fcn\u00fcr&#8221; alan\u0131 belirlemek istedi\u011finizde kullan\u0131\u015fl\u0131d\u0131r.<\/p>\n<h4>clientWidth&#8217;in Detayl\u0131 \u0130ncelenmesi<\/h4>\n<p><code>clientWidth<\/code> \u00f6zelli\u011fi, bir HTML eleman\u0131n\u0131n yatay y\u00f6ndeki kullan\u0131labilir alan\u0131n\u0131 \u00f6l\u00e7er. Bu \u00f6l\u00e7\u00fcm, eleman\u0131n kendisine uygulanan CSS geni\u015flik de\u011feri, eleman\u0131n i\u00e7eri\u011fi ve dolgu (padding) de\u011ferleri taraf\u0131ndan belirlenir. Ancak, kenarl\u0131k (border) ve d\u0131\u015f bo\u015fluk (margin) de\u011ferleri bu \u00f6l\u00e7\u00fcme dahil edilmez. Ayr\u0131ca, e\u011fer eleman\u0131n i\u00e7eri\u011fi yatay bir kayd\u0131rma \u00e7ubu\u011funa neden oluyorsa, bu kayd\u0131rma \u00e7ubu\u011funun geni\u015fli\u011fi de <code>clientWidth<\/code> de\u011ferinden \u00e7\u0131kar\u0131l\u0131r.<\/p>\n<p><strong>\u00d6rnek Senaryo:<\/strong><br \/>\nBir <code>div<\/code> eleman\u0131n\u0131z oldu\u011funu varsayal\u0131m:<\/p>\n<pre><code class=\"language-html\"><div id=\"myDiv\" style=\"width: 200px; padding: 20px; border: 5px solid black; overflow: auto;\">\n    Bu bir test i\u00e7eri\u011fidir. \u00c7ok uzun bir metin ekleyelim ki kayd\u0131rma \u00e7ubu\u011fu olu\u015fsun. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.\n<\/div><\/code><\/pre>\n<p>Bu <code>div<\/code> eleman\u0131n\u0131n <code>clientWidth<\/code> de\u011feri \u015fu \u015fekilde hesaplan\u0131r:<br \/>\n*   <code>width<\/code>: 200px<br \/>\n*   <code>padding-left<\/code>: 20px<br \/>\n*   <code>padding-right<\/code>: 20px<br \/>\n*   <code>border-left<\/code>: 5px<br \/>\n*   <code>border-right<\/code>: 5px<\/p>\n<p>Normalde, <code>width<\/code> + <code>padding-left<\/code> + <code>padding-right<\/code> = 200 + 20 + 20 = 240px olmas\u0131n\u0131 beklersiniz. Ancak, <code>clientWidth<\/code> kenarl\u0131klar\u0131 ve kayd\u0131rma \u00e7ubuklar\u0131n\u0131 \u00e7\u0131kar\u0131r. E\u011fer i\u00e7eri\u011fin ta\u015fmas\u0131 nedeniyle bir dikey kayd\u0131rma \u00e7ubu\u011fu olu\u015fursa (ki bu \u00f6rnekte <code>overflow: auto<\/code> ve uzun metin nedeniyle olu\u015facakt\u0131r), bu dikey kayd\u0131rma \u00e7ubu\u011fu genellikle sa\u011f tarafta yer al\u0131r ve <code>clientWidth<\/code> de\u011feri, bu kayd\u0131rma \u00e7ubu\u011funun geni\u015fli\u011fi kadar azal\u0131r. Standart bir kayd\u0131rma \u00e7ubu\u011funun geni\u015fli\u011fi taray\u0131c\u0131ya g\u00f6re de\u011fi\u015fmekle birlikte genellikle 15-17 piksel civar\u0131ndad\u0131r.<\/p>\n<p>Dolay\u0131s\u0131yla, <code>clientWidth<\/code> = (CSS <code>width<\/code> de\u011feri) + (sol <code>padding<\/code>) + (sa\u011f <code>padding<\/code>) &#8211; (varsa dikey kayd\u0131rma \u00e7ubu\u011funun geni\u015fli\u011fi).<br \/>\nE\u011fer <code>box-sizing: border-box<\/code> kullan\u0131l\u0131yorsa, CSS <code>width<\/code> de\u011feri zaten dolguyu ve kenarl\u0131\u011f\u0131 i\u00e7erir. Ancak <code>clientWidth<\/code> yine de kenarl\u0131\u011f\u0131 ve kayd\u0131rma \u00e7ubu\u011funu d\u0131\u015far\u0131da tutar. Dolay\u0131s\u0131yla <code>box-sizing: border-box<\/code> durumunda, <code>clientWidth<\/code> = <code>width<\/code> &#8211; (<code>border-left<\/code> + <code>border-right<\/code>) &#8211; (varsa dikey kayd\u0131rma \u00e7ubu\u011funun geni\u015fli\u011fi).<\/p>\n<p>Bu karma\u015f\u0131kl\u0131k, <code>clientWidth<\/code>&#8216;in eleman\u0131n &#8220;kullan\u0131labilir i\u00e7 alan\u0131n\u0131&#8221; \u00f6l\u00e7me amac\u0131ndan kaynaklan\u0131r.<\/p>\n<h4>clientHeight&#8217;in Detayl\u0131 \u0130ncelenmesi<\/h4>\n<p><code>clientHeight<\/code> \u00f6zelli\u011fi, <code>clientWidth<\/code>&#8216;in dikey kar\u015f\u0131l\u0131\u011f\u0131d\u0131r. Bir HTML eleman\u0131n\u0131n dikey y\u00f6ndeki kullan\u0131labilir alan\u0131n\u0131 \u00f6l\u00e7er. Bu \u00f6l\u00e7\u00fcm, eleman\u0131n kendisine uygulanan CSS y\u00fckseklik de\u011feri, eleman\u0131n i\u00e7eri\u011fi ve dolgu (padding) de\u011ferleri taraf\u0131ndan belirlenir. Kenarl\u0131k (border) ve d\u0131\u015f bo\u015fluk (margin) de\u011ferleri bu \u00f6l\u00e7\u00fcme dahil edilmez. E\u011fer eleman\u0131n i\u00e7eri\u011fi dikey bir kayd\u0131rma \u00e7ubu\u011funa neden oluyorsa, bu kayd\u0131rma \u00e7ubu\u011funun y\u00fcksekli\u011fi de <code>clientHeight<\/code> de\u011ferinden \u00e7\u0131kar\u0131lmaz (\u00e7\u00fcnk\u00fc dikey kayd\u0131rma \u00e7ubu\u011fu genellikle yatay olarak yer kaplamaz). Ancak, e\u011fer eleman\u0131n i\u00e7eri\u011fi yatay bir kayd\u0131rma \u00e7ubu\u011funa neden oluyorsa, bu yatay kayd\u0131rma \u00e7ubu\u011funun y\u00fcksekli\u011fi <code>clientHeight<\/code> de\u011ferinden \u00e7\u0131kar\u0131l\u0131r.<\/p>\n<p><strong>\u00d6rnek Senaryo:<\/strong><br \/>\nYukar\u0131daki <code>div<\/code> eleman\u0131n\u0131 kullanarak:<\/p>\n<pre><code class=\"language-html\"><div id=\"myDiv\" style=\"height: 150px; padding: 10px; border: 3px solid blue; overflow: auto;\">\n    Bu bir test i\u00e7eri\u011fidir. \u00c7ok uzun bir metin ekleyelim ki kayd\u0131rma \u00e7ubu\u011fu olu\u015fsun. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.\n<\/div><\/code><\/pre>\n<p>Bu <code>div<\/code> eleman\u0131n\u0131n <code>clientHeight<\/code> de\u011feri \u015fu \u015fekilde hesaplan\u0131r:<br \/>\n*   <code>height<\/code>: 150px<br \/>\n*   <code>padding-top<\/code>: 10px<br \/>\n*   <code>padding-bottom<\/code>: 10px<br \/>\n*   <code>border-top<\/code>: 3px<br \/>\n*   <code>border-bottom<\/code>: 3px<\/p>\n<p><code>clientHeight<\/code> = (CSS <code>height<\/code> de\u011feri) + (\u00fcst <code>padding<\/code>) + (alt <code>padding<\/code>) &#8211; (varsa yatay kayd\u0131rma \u00e7ubu\u011funun y\u00fcksekli\u011fi).<br \/>\nE\u011fer <code>box-sizing: border-box<\/code> kullan\u0131l\u0131yorsa, <code>clientHeight<\/code> = <code>height<\/code> &#8211; (<code>border-top<\/code> + <code>border-bottom<\/code>) &#8211; (varsa yatay kayd\u0131rma \u00e7ubu\u011funun y\u00fcksekli\u011fi).<\/p>\n<p>Yine, yatay kayd\u0131rma \u00e7ubu\u011funun y\u00fcksekli\u011fi taray\u0131c\u0131ya g\u00f6re de\u011fi\u015fmekle birlikte genellikle 15-17 piksel civar\u0131ndad\u0131r.<\/p>\n<h3>clientWidth ve clientHeight ile Di\u011fer Boyutland\u0131rma \u00d6zelliklerinin Kar\u015f\u0131la\u015ft\u0131r\u0131lmas\u0131<\/h3>\n<p>JavaScript, bir eleman\u0131n boyutlar\u0131n\u0131 ve konumunu \u00f6l\u00e7mek i\u00e7in bir dizi farkl\u0131 \u00f6zellik sunar. <code>clientWidth<\/code> ve <code>clientHeight<\/code>&#8216;i tam olarak anlamak i\u00e7in, bu \u00f6zelliklerin di\u011fer benzer \u00f6zelliklerden farklar\u0131n\u0131 bilmek \u00e7ok \u00f6nemlidir.<\/p>\n<h4>offsetWidth ve offsetHeight<\/h4>\n<p><code>offsetWidth<\/code> ve <code>offsetHeight<\/code>, bir eleman\u0131n g\u00f6rsel d\u00fczenindeki tam geni\u015fli\u011fini ve y\u00fcksekli\u011fini d\u00f6nd\u00fcr\u00fcr. Bu de\u011ferler \u015funlar\u0131 i\u00e7erir:<br \/>\n*   Eleman\u0131n i\u00e7eri\u011fi<br \/>\n*   Padding (dolgu)<br \/>\n*   Border (kenarl\u0131k)<br \/>\n*   Varsa dikey kayd\u0131rma \u00e7ubu\u011funun geni\u015fli\u011fi (<code>offsetWidth<\/code> i\u00e7in) veya yatay kayd\u0131rma \u00e7ubu\u011funun y\u00fcksekli\u011fi (<code>offsetHeight<\/code> i\u00e7in).<\/p>\n<p><strong>Fark:<\/strong><br \/>\n*   <code>clientWidth<\/code>\/<code>clientHeight<\/code>: \u0130\u00e7erik + Padding (Kayd\u0131rma \u00e7ubu\u011fu ve Border hari\u00e7)<br \/>\n*   <code>offsetWidth<\/code>\/<code>offsetHeight<\/code>: \u0130\u00e7erik + Padding + Border + Kayd\u0131rma \u00e7ubu\u011fu (Varsa)<\/p>\n<p><code>offsetWidth<\/code> ve <code>offsetHeight<\/code>, bir eleman\u0131n &#8220;d\u0131\u015f&#8221; boyutunu, yani DOM&#8217;da ne kadar yer kaplad\u0131\u011f\u0131n\u0131 \u00f6l\u00e7mek i\u00e7in kullan\u0131l\u0131rken, <code>clientWidth<\/code> ve <code>clientHeight<\/code> eleman\u0131n &#8220;i\u00e7&#8221; kullan\u0131labilir alan\u0131n\u0131 \u00f6l\u00e7er.<\/p>\n<p><strong>\u00d6rnek Kar\u015f\u0131la\u015ft\u0131rma:<\/strong><\/p>\n<pre><code class=\"language-html\"><div id=\"testDiv\" style=\"width: 100px; height: 100px; padding: 10px; border: 5px solid red; margin: 15px; overflow: auto;\">\n    \u00c7ok uzun bir i\u00e7erik... (kayd\u0131rma \u00e7ubu\u011fu olu\u015fturacak kadar)\n<\/div><\/code><\/pre>\n<pre><code class=\"language-javascript\">const div = document.getElementById('testDiv');\nconsole.log('clientWidth:', div.clientWidth);   \/\/ 100 (width) + 10 (padding-left) + 10 (padding-right) - ~17 (scrollbar) = ~103\nconsole.log('clientHeight:', div.clientHeight); \/\/ 100 (height) + 10 (padding-top) + 10 (padding-bottom) - ~17 (scrollbar, if horizontal) = ~103\nconsole.log('offsetWidth:', div.offsetWidth);   \/\/ 100 (width) + 10 (padding-left) + 10 (padding-right) + 5 (border-left) + 5 (border-right) = 130\nconsole.log('offsetHeight:', div.offsetHeight); \/\/ 100 (height) + 10 (padding-top) + 10 (padding-bottom) + 5 (border-top) + 5 (border-bottom) = 130<\/code><\/pre>\n<p>Not: Kayd\u0131rma \u00e7ubu\u011fu geni\u015flikleri taray\u0131c\u0131ya g\u00f6re de\u011fi\u015febilir. Bu hesaplamalar yakla\u015f\u0131k de\u011ferlerdir.<\/p>\n<h4>scrollWidth ve scrollHeight<\/h4>\n<p><code>scrollWidth<\/code> ve <code>scrollHeight<\/code>, bir eleman\u0131n i\u00e7eri\u011finin (g\u00f6r\u00fcn\u00fcr veya gizli) toplam geni\u015fli\u011fini ve y\u00fcksekli\u011fini d\u00f6nd\u00fcr\u00fcr. Bu de\u011ferler \u015funlar\u0131 i\u00e7erir:<br \/>\n*   Eleman\u0131n i\u00e7eri\u011fi (ta\u015fan i\u00e7erik dahil)<br \/>\n*   Padding (dolgu)<\/p>\n<p><strong>Fark:<\/strong><br \/>\n*   <code>clientWidth<\/code>\/<code>clientHeight<\/code>: G\u00f6r\u00fcn\u00fcr i\u00e7erik + Padding (Kayd\u0131rma \u00e7ubu\u011fu ve Border hari\u00e7)<br \/>\n*   <code>scrollWidth<\/code>\/<code>scrollHeight<\/code>: T\u00fcm i\u00e7erik (ta\u015fan dahil) + Padding (Kayd\u0131rma \u00e7ubu\u011fu ve Border hari\u00e7)<\/p>\n<p><code>scrollWidth<\/code> ve <code>scrollHeight<\/code>, bir eleman\u0131n t\u00fcm i\u00e7eri\u011finin (kayd\u0131r\u0131labilir alan dahil) ne kadar yer kaplad\u0131\u011f\u0131n\u0131 \u00f6l\u00e7mek i\u00e7in kullan\u0131l\u0131r. Bu \u00f6zellikler, \u00f6zellikle \u00f6zel kayd\u0131rma \u00e7ubuklar\u0131 olu\u015ftururken veya bir eleman\u0131n i\u00e7eri\u011finin tamam\u0131n\u0131 programatik olarak g\u00f6r\u00fcnt\u00fclemek istedi\u011finizde faydal\u0131d\u0131r.<\/p>\n<p><strong>\u00d6rnek Kar\u015f\u0131la\u015ft\u0131rma:<\/strong><br \/>\nYukar\u0131daki <code>testDiv<\/code> \u00f6rne\u011fi ile devam edelim. \u0130\u00e7eri\u011fin <code>100px<\/code> geni\u015fli\u011fe s\u0131\u011fmad\u0131\u011f\u0131n\u0131 varsayal\u0131m.<\/p>\n<pre><code class=\"language-javascript\">const div = document.getElementById('testDiv');\nconsole.log('clientWidth:', div.clientWidth);     \/\/ ~103 (g\u00f6r\u00fcn\u00fcr alan)\nconsole.log('scrollWidth:', div.scrollWidth);     \/\/ \u0130\u00e7eri\u011fin tamam\u0131n\u0131n kaplad\u0131\u011f\u0131 geni\u015flik + padding (\u00f6rn: 500px)\nconsole.log('clientHeight:', div.clientHeight);   \/\/ ~103 (g\u00f6r\u00fcn\u00fcr alan)\nconsole.log('scrollHeight:', div.scrollHeight);   \/\/ \u0130\u00e7eri\u011fin tamam\u0131n\u0131n kaplad\u0131\u011f\u0131 y\u00fckseklik + padding (\u00f6rn: 300px)<\/code><\/pre>\n<p>E\u011fer eleman\u0131n i\u00e7eri\u011fi ta\u015fm\u0131yorsa, <code>clientWidth<\/code> yakla\u015f\u0131k olarak <code>scrollWidth<\/code>&#8216;e e\u015fit olabilir (kayd\u0131rma \u00e7ubu\u011fu fark\u0131 hari\u00e7). Benzer \u015fekilde <code>clientHeight<\/code> de <code>scrollHeight<\/code>&#8216;e e\u015fit olabilir.<\/p>\n<h4>window.innerWidth ve window.innerHeight<\/h4>\n<p>Bu \u00f6zellikler, taray\u0131c\u0131 penceresinin (viewport) geni\u015fli\u011fini ve y\u00fcksekli\u011fini d\u00f6nd\u00fcr\u00fcr. Bu \u00f6l\u00e7\u00fcmler, varsa kayd\u0131rma \u00e7ubuklar\u0131n\u0131n geni\u015fli\u011fini ve y\u00fcksekli\u011fini <strong>i\u00e7erir<\/strong>.<\/p>\n<p><strong>Fark:<\/strong><br \/>\n*   <code>clientWidth<\/code>\/<code>clientHeight<\/code>: Belirli bir DOM eleman\u0131n\u0131n i\u00e7 kullan\u0131labilir alan\u0131 (kayd\u0131rma \u00e7ubu\u011fu hari\u00e7).<br \/>\n*   <code>window.innerWidth<\/code>\/<code>innerHeight<\/code>: Taray\u0131c\u0131 penceresinin (viewport) boyutlar\u0131 (kayd\u0131rma \u00e7ubu\u011fu dahil).<\/p>\n<p>Bu \u00f6zellikler, genellikle sayfan\u0131n genel d\u00fczenini veya duyarl\u0131 tasar\u0131mlar\u0131 y\u00f6netmek i\u00e7in kullan\u0131l\u0131r.<\/p>\n<h4>document.documentElement.clientWidth ve document.documentElement.clientHeight<\/h4>\n<p><code>document.documentElement<\/code> genellikle <code><html><\/code> etiketini temsil eder. Bu \u00f6zellikler, taray\u0131c\u0131 penceresinin (viewport) geni\u015fli\u011fini ve y\u00fcksekli\u011fini d\u00f6nd\u00fcr\u00fcr, ancak <code>window.innerWidth<\/code>\/<code>innerHeight<\/code>&#8216;in aksine, varsa kayd\u0131rma \u00e7ubuklar\u0131n\u0131n geni\u015fli\u011fini ve y\u00fcksekli\u011fini <strong>hari\u00e7 tutar<\/strong>.<\/p>\n<p><strong>Fark:<\/strong><br \/>\n*   <code>window.innerWidth<\/code>\/<code>innerHeight<\/code>: Viewport boyutu (kayd\u0131rma \u00e7ubu\u011fu dahil).<br \/>\n*   <code>document.documentElement.clientWidth<\/code>\/<code>clientHeight<\/code>: Viewport boyutu (kayd\u0131rma \u00e7ubu\u011fu hari\u00e7).<\/p>\n<p>Modern taray\u0131c\u0131larda, <code>document.documentElement.clientWidth<\/code> ve <code>document.documentElement.clientHeight<\/code> genellikle kayd\u0131rma \u00e7ubuklar\u0131 olmadan sayfan\u0131n g\u00f6rsel alan\u0131n\u0131 do\u011fru bir \u015fekilde \u00f6l\u00e7mek i\u00e7in tercih edilir. Bu, \u00f6zellikle responsive tasar\u0131mlarda medya sorgular\u0131yla uyumlu bir \u015fekilde \u00e7al\u0131\u015fmak i\u00e7in \u00f6nemlidir.<\/p>\n<pre><code class=\"language-javascript\">console.log('window.innerWidth:', window.innerWidth);\nconsole.log('window.innerHeight:', window.innerHeight);\nconsole.log('document.documentElement.clientWidth:', document.documentElement.clientWidth);\nconsole.log('document.documentElement.clientHeight:', document.documentElement.clientHeight);<\/code><\/pre>\n<p>E\u011fer sayfa kayd\u0131rma \u00e7ubuklar\u0131na sahipse, <code>window.innerWidth<\/code> > <code>document.documentElement.clientWidth<\/code> ve <code>window.innerHeight<\/code> > <code>document.documentElement.clientHeight<\/code> olacakt\u0131r.<\/p>\n<h3>Pratik Uygulamalar ve Kullan\u0131m Senaryolar\u0131<\/h3>\n<p><code>clientWidth<\/code> ve <code>clientHeight<\/code> \u00f6zelliklerinin do\u011fru anla\u015f\u0131lmas\u0131, bir\u00e7ok web geli\u015ftirme senaryosunda kritik \u00f6neme sahiptir. \u0130\u015fte baz\u0131 yayg\u0131n kullan\u0131m alanlar\u0131:<\/p>\n<h4>1. Duyarl\u0131 Tasar\u0131m ve Dinamik D\u00fczen Ayarlamalar\u0131<\/h4>\n<p>Bir bile\u015fenin, i\u00e7inde bulundu\u011fu kapsay\u0131c\u0131n\u0131n mevcut alan\u0131na g\u00f6re kendini yeniden boyutland\u0131rmas\u0131 veya i\u00e7eri\u011fini yeniden d\u00fczenlemesi gerekti\u011finde <code>clientWidth<\/code> ve <code>clientHeight<\/code> kullan\u0131l\u0131r.<br \/>\n*   <strong>\u00d6rnek:<\/strong> Bir resim galerisinin, mevcut geni\u015fli\u011fe g\u00f6re resim say\u0131s\u0131n\u0131 veya boyutunu ayarlamas\u0131. Bir <code>div<\/code> eleman\u0131n\u0131n <code>clientWidth<\/code> de\u011ferine g\u00f6re i\u00e7indeki \u00f6\u011felerin \u0131zgara d\u00fczenini de\u011fi\u015ftirmek.<br \/>\n*   <strong>Kod \u00d6rne\u011fi:<\/strong><\/p>\n<pre><code class=\"language-javascript\">function adjustGalleryLayout() {\n        const galleryContainer = document.getElementById('gallery');\n        const availableWidth = galleryContainer.clientWidth;\n        \/\/ availableWidth de\u011ferine g\u00f6re resimlerin boyutlar\u0131n\u0131 veya say\u0131s\u0131n\u0131 ayarla\n        if (availableWidth < 600) {\n            galleryContainer.classList.add('mobile-layout');\n        } else {\n            galleryContainer.classList.remove('mobile-layout');\n        }\n    }\n    window.addEventListener('resize', adjustGalleryLayout);\n    adjustGalleryLayout(); \/\/ Sayfa y\u00fcklendi\u011finde de \u00e7al\u0131\u015ft\u0131r<\/code><\/pre>\n<h4>2. Eleman G\u00f6r\u00fcn\u00fcrl\u00fc\u011f\u00fcn\u00fc Kontrol Etme<\/h4>\n<p>Bir eleman\u0131n tamamen g\u00f6r\u00fcn\u00fcr olup olmad\u0131\u011f\u0131n\u0131 veya belirli bir k\u0131sm\u0131n\u0131n g\u00f6r\u00fcn\u00fcr olup olmad\u0131\u011f\u0131n\u0131 kontrol etmek i\u00e7in <code>clientWidth<\/code> ve <code>clientHeight<\/code> ile <code>scrollLeft<\/code>\/<code>scrollTop<\/code> ve <code>getBoundingClientRect()<\/code> y\u00f6ntemleri birlikte kullan\u0131labilir. \u00d6zellikle, bir eleman\u0131n i\u00e7indeki kayd\u0131r\u0131labilir alan\u0131n ne kadar\u0131n\u0131n kullan\u0131c\u0131ya a\u00e7\u0131k oldu\u011funu anlamak i\u00e7in bu \u00f6zellikler temel olu\u015fturur.<\/p>\n<h4>3. \u00d6zel Kayd\u0131rma \u00c7ubuklar\u0131 ve Sanal Kayd\u0131rma<\/h4>\n<p>Taray\u0131c\u0131n\u0131n varsay\u0131lan kayd\u0131rma \u00e7ubuklar\u0131n\u0131 gizleyip, bunun yerine kendi \u00f6zel kayd\u0131rma \u00e7ubuklar\u0131n\u0131z\u0131 uygulamak istedi\u011finizde <code>clientWidth<\/code>, <code>clientHeight<\/code>, <code>scrollWidth<\/code>, <code>scrollHeight<\/code> ve <code>scrollTop<\/code>\/<code>scrollLeft<\/code> de\u011ferleri vazge\u00e7ilmezdir. <code>clientWidth<\/code> ve <code>clientHeight<\/code>, kayd\u0131rma \u00e7ubu\u011funun kendisinin ne kadar alan kaplad\u0131\u011f\u0131n\u0131 hesaba katmadan, eleman\u0131n i\u00e7eri\u011finin g\u00f6r\u00fcn\u00fcr alan\u0131n\u0131 verir.<\/p>\n<h4>4. Canvas ve SVG Boyutland\u0131rma<\/h4>\n<p>Bir <code><canvas><\/code> veya <code><svg><\/code> eleman\u0131n\u0131n boyutlar\u0131n\u0131, i\u00e7inde bulundu\u011fu kapsay\u0131c\u0131n\u0131n kullan\u0131labilir alan\u0131na g\u00f6re dinamik olarak ayarlamak i\u00e7in <code>clientWidth<\/code> ve <code>clientHeight<\/code> kullan\u0131labilir.<br \/>\n*   <strong>\u00d6rnek:<\/strong> Bir grafik uygulamas\u0131nda, canvas'\u0131n boyutunu kapsay\u0131c\u0131 div'in <code>clientWidth<\/code> ve <code>clientHeight<\/code> de\u011ferlerine e\u015fitlemek.<br \/>\n*   <strong>Kod \u00d6rne\u011fi:<\/strong><\/p>\n<pre><code class=\"language-javascript\">const canvas = document.getElementById('myCanvas');\n    const container = canvas.parentElement; \/\/ Canvas'\u0131n kapsay\u0131c\u0131s\u0131\n    canvas.width = container.clientWidth;\n    canvas.height = container.clientHeight;<\/code><\/pre>\n<h4>5. Popup ve Modal Konumland\u0131rma<\/h4>\n<p>Bir popup veya modal pencereyi, belirli bir eleman\u0131n i\u00e7ine veya etraf\u0131na konumland\u0131r\u0131rken, eleman\u0131n i\u00e7 boyutlar\u0131n\u0131 bilmek \u00f6nemlidir. <code>clientWidth<\/code> ve <code>clientHeight<\/code>, bu t\u00fcr \u00f6\u011felerin do\u011fru bir \u015fekilde hizalanmas\u0131na yard\u0131mc\u0131 olabilir.<\/p>\n<h4>6. Metin K\u0131rpma ve Yeniden Boyutland\u0131rma<\/h4>\n<p>Bir metin blo\u011funun belirli bir <code>div<\/code> i\u00e7ine s\u0131\u011fd\u0131r\u0131lmas\u0131 gerekti\u011finde, <code>clientWidth<\/code> de\u011feri, metnin s\u0131\u011fabilece\u011fi maksimum geni\u015fli\u011fi belirlemek i\u00e7in kullan\u0131labilir. Metin, bu geni\u015fli\u011fi a\u015farsa, k\u0131rp\u0131labilir veya yaz\u0131 tipi boyutu ayarlanabilir.<\/p>\n<h4>7. Performans Optimizasyonu<\/h4>\n<p>Baz\u0131 durumlarda, bir eleman\u0131n boyutunu okumak (layout okuma) ve ard\u0131ndan bir CSS \u00f6zelli\u011fini de\u011fi\u015ftirmek (layout yazma) taray\u0131c\u0131da \"layout thrashing\"e neden olabilir, bu da performans\u0131 d\u00fc\u015f\u00fcr\u00fcr. <code>clientWidth<\/code> ve <code>clientHeight<\/code> gibi \u00f6zellikler layout okuma i\u015flemleridir. Performans a\u00e7\u0131s\u0131ndan kritik uygulamalarda, okuma ve yazma i\u015flemlerini grupland\u0131rmak \u00f6nemlidir.<\/p>\n<h3>Edge Durumlar ve Dikkat Edilmesi Gerekenler<\/h3>\n<p><code>clientWidth<\/code> ve <code>clientHeight<\/code> kullan\u0131rken baz\u0131 \u00f6zel durumlar\u0131 ve potansiyel tuzaklar\u0131 g\u00f6z \u00f6n\u00fcnde bulundurmak \u00f6nemlidir:<\/p>\n<h4>1. <code>display: none<\/code> Elemanlar\u0131<\/h4>\n<p>E\u011fer bir eleman\u0131n <code>display<\/code> \u00f6zelli\u011fi <code>none<\/code> olarak ayarlanm\u0131\u015fsa, eleman d\u00fczen a\u011fac\u0131ndan tamamen kald\u0131r\u0131l\u0131r ve <code>clientWidth<\/code> ile <code>clientHeight<\/code> de\u011ferleri <code>0<\/code> d\u00f6nd\u00fcr\u00fcr. Bu, eleman gizli oldu\u011funda boyutunu almak istiyorsan\u0131z bir sorun te\u015fkil edebilir. Bu durumda, eleman\u0131 k\u0131sa s\u00fcreli\u011fine g\u00f6r\u00fcn\u00fcr yap\u0131p boyutunu al\u0131p tekrar gizlemek veya <code>visibility: hidden<\/code> gibi farkl\u0131 bir gizleme y\u00f6ntemi kullanmak gerekebilir (ancak <code>visibility: hidden<\/code> eleman\u0131 d\u00fczen a\u011fac\u0131nda tutar ve boyutlar\u0131 do\u011fru verir).<\/p>\n<h4>2. Inline Elemanlar<\/h4>\n<p><code><span><\/code>, <code><a><\/code> gibi <code>display: inline<\/code> elemanlar, CSS <code>width<\/code> ve <code>height<\/code> \u00f6zelliklerini desteklemezler. Bu nedenle, bu elemanlar i\u00e7in <code>clientWidth<\/code> ve <code>clientHeight<\/code> de\u011ferleri genellikle <code>0<\/code> olacakt\u0131r, \u00e7\u00fcnk\u00fc bu elemanlar\u0131n \"i\u00e7erik alan\u0131\" kavram\u0131 blok seviyesi elemanlardan farkl\u0131d\u0131r. Blok seviyesi veya <code>inline-block<\/code> elemanlar i\u00e7in bu \u00f6zellikler anlaml\u0131d\u0131r.<\/p>\n<h4>3. <code>box-sizing<\/code> \u00d6zelli\u011fi<\/h4>\n<p><code>box-sizing<\/code> CSS \u00f6zelli\u011fi (<code>content-box<\/code> veya <code>border-box<\/code>), eleman\u0131n <code>width<\/code> ve <code>height<\/code> de\u011ferlerinin nas\u0131l yorumland\u0131\u011f\u0131n\u0131 de\u011fi\u015ftirir. Ancak <code>clientWidth<\/code> ve <code>clientHeight<\/code>'in tan\u0131m\u0131 sabittir: her zaman i\u00e7eri\u011fi ve dolguyu i\u00e7erir, kenarl\u0131\u011f\u0131 ve kayd\u0131rma \u00e7ubu\u011funu d\u0131\u015far\u0131da b\u0131rak\u0131r. Bu nedenle, <code>box-sizing<\/code> de\u011ferinden ba\u011f\u0131ms\u0131z olarak, <code>clientWidth<\/code> ve <code>clientHeight<\/code> ayn\u0131 \u015fekilde hesaplan\u0131r. Ancak, <code>offsetWidth<\/code> gibi di\u011fer \u00f6zellikler <code>box-sizing<\/code>'den etkilenebilir.<\/p>\n<h4>4. Kayd\u0131rma \u00c7ubuklar\u0131n\u0131n Varl\u0131\u011f\u0131<\/h4>\n<p>Daha \u00f6nce de belirtildi\u011fi gibi, <code>clientWidth<\/code> ve <code>clientHeight<\/code> de\u011ferleri, varsa kayd\u0131rma \u00e7ubuklar\u0131n\u0131n geni\u015fli\u011fini\/y\u00fcksekli\u011fini \u00e7\u0131kar\u0131r. Bu, genellikle istenen davran\u0131\u015ft\u0131r (eleman\u0131n kullan\u0131labilir i\u00e7 alan\u0131n\u0131 verir), ancak kayd\u0131rma \u00e7ubuklar\u0131n\u0131n kendisinin boyutunu hesaba katman\u0131z gerekiyorsa, <code>offsetWidth<\/code>\/<code>offsetHeight<\/code> veya <code>window.innerWidth<\/code>\/<code>innerHeight<\/code> gibi di\u011fer \u00f6zellikleri kullanman\u0131z gerekebilir.<\/p>\n<h4>5. Taray\u0131c\u0131 Tutarl\u0131l\u0131\u011f\u0131<\/h4>\n<p>Genel olarak, <code>clientWidth<\/code> ve <code>clientHeight<\/code> modern taray\u0131c\u0131larda olduk\u00e7a tutarl\u0131 \u00e7al\u0131\u015f\u0131r. Ancak, kayd\u0131rma \u00e7ubuklar\u0131n\u0131n varsay\u0131lan geni\u015fli\u011fi veya y\u00fcksekli\u011fi gibi k\u00fc\u00e7\u00fck farkl\u0131l\u0131klar taray\u0131c\u0131lar aras\u0131nda de\u011fi\u015febilir. Bu t\u00fcr k\u00fc\u00e7\u00fck farklar genellikle \u00e7o\u011fu uygulama i\u00e7in sorun te\u015fkil etmez, ancak piksel hassasiyeti gerektiren durumlarda test yapmak faydal\u0131 olabilir.<\/p>\n<h3>Sonu\u00e7<\/h3>\n<p><code>clientWidth<\/code> ve <code>clientHeight<\/code>, JavaScript'te bir DOM eleman\u0131n\u0131n i\u00e7 kullan\u0131labilir geni\u015fli\u011fini ve y\u00fcksekli\u011fini \u00f6l\u00e7mek i\u00e7in g\u00fc\u00e7l\u00fc ve temel \u00f6zelliklerdir. Dolguyu (padding) i\u00e7erirken, kenarl\u0131\u011f\u0131 (border) ve varsa kayd\u0131rma \u00e7ubuklar\u0131n\u0131 (scrollbar) d\u0131\u015far\u0131da b\u0131rakarak, bir eleman\u0131n i\u00e7eri\u011finin ger\u00e7ekten ne kadar alana sahip oldu\u011funu net bir \u015fekilde ortaya koyarlar.<\/p>\n<p>Bu \u00f6zellikler, <code>offsetWidth<\/code>\/<code>offsetHeight<\/code>, <code>scrollWidth<\/code>\/<code>scrollHeight<\/code>, <code>window.innerWidth<\/code>\/<code>innerHeight<\/code> ve <code>document.documentElement.clientWidth<\/code>\/<code>clientHeight<\/code> gibi di\u011fer boyutland\u0131rma \u00f6zellikleriyle birlikte, web geli\u015ftiricilerine web sayfalar\u0131n\u0131n d\u00fczenini ve boyutland\u0131rmas\u0131n\u0131 hassas bir \u015fekilde kontrol etme yetene\u011fi sunar. Duyarl\u0131 tasar\u0131mlar, dinamik i\u00e7erik y\u00f6netimi, \u00f6zel UI bile\u015fenleri ve performans optimizasyonu gibi bir\u00e7ok alanda vazge\u00e7ilmez ara\u00e7lard\u0131r.<\/p>\n<p>Bu makalede sunulan detayl\u0131 a\u00e7\u0131klamalar, kar\u015f\u0131la\u015ft\u0131rmalar ve pratik \u00f6rnekler sayesinde, <code>clientWidth<\/code> ve <code>clientHeight<\/code>'in \u00e7al\u0131\u015fma prensiplerini ve ne zaman kullan\u0131lmalar\u0131 gerekti\u011fini daha iyi anlam\u0131\u015f olmal\u0131s\u0131n\u0131z. Bu bilgiler, daha sa\u011flam, duyarl\u0131 ve kullan\u0131c\u0131 dostu web uygulamalar\u0131 geli\u015ftirmenize yard\u0131mc\u0131 olacakt\u0131r.<\/body><\/p>\n","protected":false},"excerpt":{"rendered":"JavaScript&#8217;te clientWidth ve clientHeight: Web Sayfas\u0131 Boyutland\u0131rma ve D\u00fczenlemede Derinlemesine Bir K\u0131lavuz\nWeb geli\u015ftirmenin temel ta\u015flar\u0131n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"csco_page_header_type":"","csco_page_load_nextpost":"","csco_page_subscribe_form":"","csco_page_contact_form":"","footnotes":""},"categories":[129],"tags":[],"class_list":{"0":"post-38968","1":"post","2":"type-post","3":"status-publish","4":"format-standard","6":"category-javascript","7":"cs-entry","8":"cs-video-wrap"},"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v20.5 (Yoast SEO v25.3.1) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>JavaScript&#039;te clientWidth ve clientHeight: Web Sayfas\u0131 Boyutland\u0131rma ve D\u00fczenlemede Derinlemesine Bir K\u0131lavuz - Kodlar\u0131n Gizemli D\u00fcnyas\u0131<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/fatihsoysal.com\/blog\/javascriptte-clientwidth-ve-clientheight-web-sayfasi-boyutlandirma-ve-duzenlemede-derinlemesine-bir-kilavuz\/\" \/>\n<meta property=\"og:locale\" content=\"tr_TR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"JavaScript&#039;te clientWidth ve clientHeight: Web Sayfas\u0131 Boyutland\u0131rma ve D\u00fczenlemede Derinlemesine Bir K\u0131lavuz\" \/>\n<meta property=\"og:description\" content=\"JavaScript&#039;te clientWidth ve clientHeight: Web Sayfas\u0131 Boyutland\u0131rma ve D\u00fczenlemede Derinlemesine Bir K\u0131lavuz Web geli\u015ftirmenin temel ta\u015flar\u0131n\" \/>\n<meta property=\"og:url\" content=\"https:\/\/fatihsoysal.com\/blog\/javascriptte-clientwidth-ve-clientheight-web-sayfasi-boyutlandirma-ve-duzenlemede-derinlemesine-bir-kilavuz\/\" \/>\n<meta property=\"og:site_name\" content=\"Kodlar\u0131n Gizemli D\u00fcnyas\u0131\" \/>\n<meta property=\"article:published_time\" content=\"2026-02-11T14:40:37+00:00\" \/>\n<meta name=\"author\" content=\"Fatih Soysal\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Yazan:\" \/>\n\t<meta name=\"twitter:data1\" content=\"Fatih Soysal\" \/>\n\t<meta name=\"twitter:label2\" content=\"Tahmini okuma s\u00fcresi\" \/>\n\t<meta name=\"twitter:data2\" content=\"15 dakika\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/fatihsoysal.com\/blog\/javascriptte-clientwidth-ve-clientheight-web-sayfasi-boyutlandirma-ve-duzenlemede-derinlemesine-bir-kilavuz\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/fatihsoysal.com\/blog\/javascriptte-clientwidth-ve-clientheight-web-sayfasi-boyutlandirma-ve-duzenlemede-derinlemesine-bir-kilavuz\/\"},\"author\":{\"name\":\"Fatih Soysal\",\"@id\":\"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/002a254750921dcfd568a99e48240dd1\"},\"headline\":\"JavaScript&#8217;te clientWidth ve clientHeight: Web Sayfas\u0131 Boyutland\u0131rma ve D\u00fczenlemede Derinlemesine Bir K\u0131lavuz\",\"datePublished\":\"2026-02-11T14:40:37+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/fatihsoysal.com\/blog\/javascriptte-clientwidth-ve-clientheight-web-sayfasi-boyutlandirma-ve-duzenlemede-derinlemesine-bir-kilavuz\/\"},\"wordCount\":2363,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/002a254750921dcfd568a99e48240dd1\"},\"articleSection\":[\"Javascript\"],\"inLanguage\":\"tr\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/fatihsoysal.com\/blog\/javascriptte-clientwidth-ve-clientheight-web-sayfasi-boyutlandirma-ve-duzenlemede-derinlemesine-bir-kilavuz\/#respond\"]}],\"copyrightYear\":\"2026\",\"copyrightHolder\":{\"@id\":\"https:\/\/fatihsoysal.com\/blog\/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/fatihsoysal.com\/blog\/javascriptte-clientwidth-ve-clientheight-web-sayfasi-boyutlandirma-ve-duzenlemede-derinlemesine-bir-kilavuz\/\",\"url\":\"https:\/\/fatihsoysal.com\/blog\/javascriptte-clientwidth-ve-clientheight-web-sayfasi-boyutlandirma-ve-duzenlemede-derinlemesine-bir-kilavuz\/\",\"name\":\"JavaScript'te clientWidth ve clientHeight: Web Sayfas\u0131 Boyutland\u0131rma ve D\u00fczenlemede Derinlemesine Bir K\u0131lavuz - Kodlar\u0131n Gizemli D\u00fcnyas\u0131\",\"isPartOf\":{\"@id\":\"https:\/\/fatihsoysal.com\/blog\/#website\"},\"datePublished\":\"2026-02-11T14:40:37+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/fatihsoysal.com\/blog\/javascriptte-clientwidth-ve-clientheight-web-sayfasi-boyutlandirma-ve-duzenlemede-derinlemesine-bir-kilavuz\/#breadcrumb\"},\"inLanguage\":\"tr\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/fatihsoysal.com\/blog\/javascriptte-clientwidth-ve-clientheight-web-sayfasi-boyutlandirma-ve-duzenlemede-derinlemesine-bir-kilavuz\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/fatihsoysal.com\/blog\/javascriptte-clientwidth-ve-clientheight-web-sayfasi-boyutlandirma-ve-duzenlemede-derinlemesine-bir-kilavuz\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Anasayfa\",\"item\":\"https:\/\/fatihsoysal.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"JavaScript&#8217;te clientWidth ve clientHeight: Web Sayfas\u0131 Boyutland\u0131rma ve D\u00fczenlemede Derinlemesine Bir K\u0131lavuz\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/fatihsoysal.com\/blog\/#website\",\"url\":\"https:\/\/fatihsoysal.com\/blog\/\",\"name\":\"Fatihsoysal.com\",\"description\":\"Blog - Yaz\u0131l\u0131m D\u00fcnyas\u0131 Tecr\u00fcbelerim\",\"publisher\":{\"@id\":\"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/002a254750921dcfd568a99e48240dd1\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/fatihsoysal.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"tr\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/002a254750921dcfd568a99e48240dd1\",\"name\":\"Fatih Soysal\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"tr\",\"@id\":\"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/fatihsoysal.com\/blog\/wp-content\/uploads\/2024\/04\/cropped-replicate-prediction-3kgg1hgjn5rgp0cf0p5tr0jw7w-1.png\",\"contentUrl\":\"https:\/\/fatihsoysal.com\/blog\/wp-content\/uploads\/2024\/04\/cropped-replicate-prediction-3kgg1hgjn5rgp0cf0p5tr0jw7w-1.png\",\"width\":512,\"height\":512,\"caption\":\"Fatih Soysal\"},\"logo\":{\"@id\":\"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/image\/\"},\"description\":\"Kullan\u0131m ve kodlama m\u00fckemmeliyetini odak alan uygulamalar olu\u015fturma deneyimine sahip, profesyonel olarak 15+ y\u0131l \u00fczeri deneyime sahip bir yaz\u0131l\u0131m m\u00fchendisi.\",\"url\":\"https:\/\/fatihsoysal.com\/blog\/author\/fatihsoysal\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"JavaScript'te clientWidth ve clientHeight: Web Sayfas\u0131 Boyutland\u0131rma ve D\u00fczenlemede Derinlemesine Bir K\u0131lavuz - Kodlar\u0131n Gizemli D\u00fcnyas\u0131","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/fatihsoysal.com\/blog\/javascriptte-clientwidth-ve-clientheight-web-sayfasi-boyutlandirma-ve-duzenlemede-derinlemesine-bir-kilavuz\/","og_locale":"tr_TR","og_type":"article","og_title":"JavaScript'te clientWidth ve clientHeight: Web Sayfas\u0131 Boyutland\u0131rma ve D\u00fczenlemede Derinlemesine Bir K\u0131lavuz","og_description":"JavaScript'te clientWidth ve clientHeight: Web Sayfas\u0131 Boyutland\u0131rma ve D\u00fczenlemede Derinlemesine Bir K\u0131lavuz Web geli\u015ftirmenin temel ta\u015flar\u0131n","og_url":"https:\/\/fatihsoysal.com\/blog\/javascriptte-clientwidth-ve-clientheight-web-sayfasi-boyutlandirma-ve-duzenlemede-derinlemesine-bir-kilavuz\/","og_site_name":"Kodlar\u0131n Gizemli D\u00fcnyas\u0131","article_published_time":"2026-02-11T14:40:37+00:00","author":"Fatih Soysal","twitter_card":"summary_large_image","twitter_misc":{"Yazan:":"Fatih Soysal","Tahmini okuma s\u00fcresi":"15 dakika"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/fatihsoysal.com\/blog\/javascriptte-clientwidth-ve-clientheight-web-sayfasi-boyutlandirma-ve-duzenlemede-derinlemesine-bir-kilavuz\/#article","isPartOf":{"@id":"https:\/\/fatihsoysal.com\/blog\/javascriptte-clientwidth-ve-clientheight-web-sayfasi-boyutlandirma-ve-duzenlemede-derinlemesine-bir-kilavuz\/"},"author":{"name":"Fatih Soysal","@id":"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/002a254750921dcfd568a99e48240dd1"},"headline":"JavaScript&#8217;te clientWidth ve clientHeight: Web Sayfas\u0131 Boyutland\u0131rma ve D\u00fczenlemede Derinlemesine Bir K\u0131lavuz","datePublished":"2026-02-11T14:40:37+00:00","mainEntityOfPage":{"@id":"https:\/\/fatihsoysal.com\/blog\/javascriptte-clientwidth-ve-clientheight-web-sayfasi-boyutlandirma-ve-duzenlemede-derinlemesine-bir-kilavuz\/"},"wordCount":2363,"commentCount":0,"publisher":{"@id":"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/002a254750921dcfd568a99e48240dd1"},"articleSection":["Javascript"],"inLanguage":"tr","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/fatihsoysal.com\/blog\/javascriptte-clientwidth-ve-clientheight-web-sayfasi-boyutlandirma-ve-duzenlemede-derinlemesine-bir-kilavuz\/#respond"]}],"copyrightYear":"2026","copyrightHolder":{"@id":"https:\/\/fatihsoysal.com\/blog\/#organization"}},{"@type":"WebPage","@id":"https:\/\/fatihsoysal.com\/blog\/javascriptte-clientwidth-ve-clientheight-web-sayfasi-boyutlandirma-ve-duzenlemede-derinlemesine-bir-kilavuz\/","url":"https:\/\/fatihsoysal.com\/blog\/javascriptte-clientwidth-ve-clientheight-web-sayfasi-boyutlandirma-ve-duzenlemede-derinlemesine-bir-kilavuz\/","name":"JavaScript'te clientWidth ve clientHeight: Web Sayfas\u0131 Boyutland\u0131rma ve D\u00fczenlemede Derinlemesine Bir K\u0131lavuz - Kodlar\u0131n Gizemli D\u00fcnyas\u0131","isPartOf":{"@id":"https:\/\/fatihsoysal.com\/blog\/#website"},"datePublished":"2026-02-11T14:40:37+00:00","breadcrumb":{"@id":"https:\/\/fatihsoysal.com\/blog\/javascriptte-clientwidth-ve-clientheight-web-sayfasi-boyutlandirma-ve-duzenlemede-derinlemesine-bir-kilavuz\/#breadcrumb"},"inLanguage":"tr","potentialAction":[{"@type":"ReadAction","target":["https:\/\/fatihsoysal.com\/blog\/javascriptte-clientwidth-ve-clientheight-web-sayfasi-boyutlandirma-ve-duzenlemede-derinlemesine-bir-kilavuz\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/fatihsoysal.com\/blog\/javascriptte-clientwidth-ve-clientheight-web-sayfasi-boyutlandirma-ve-duzenlemede-derinlemesine-bir-kilavuz\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Anasayfa","item":"https:\/\/fatihsoysal.com\/blog\/"},{"@type":"ListItem","position":2,"name":"JavaScript&#8217;te clientWidth ve clientHeight: Web Sayfas\u0131 Boyutland\u0131rma ve D\u00fczenlemede Derinlemesine Bir K\u0131lavuz"}]},{"@type":"WebSite","@id":"https:\/\/fatihsoysal.com\/blog\/#website","url":"https:\/\/fatihsoysal.com\/blog\/","name":"Fatihsoysal.com","description":"Blog - Yaz\u0131l\u0131m D\u00fcnyas\u0131 Tecr\u00fcbelerim","publisher":{"@id":"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/002a254750921dcfd568a99e48240dd1"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/fatihsoysal.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"tr"},{"@type":["Person","Organization"],"@id":"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/002a254750921dcfd568a99e48240dd1","name":"Fatih Soysal","image":{"@type":"ImageObject","inLanguage":"tr","@id":"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/fatihsoysal.com\/blog\/wp-content\/uploads\/2024\/04\/cropped-replicate-prediction-3kgg1hgjn5rgp0cf0p5tr0jw7w-1.png","contentUrl":"https:\/\/fatihsoysal.com\/blog\/wp-content\/uploads\/2024\/04\/cropped-replicate-prediction-3kgg1hgjn5rgp0cf0p5tr0jw7w-1.png","width":512,"height":512,"caption":"Fatih Soysal"},"logo":{"@id":"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/image\/"},"description":"Kullan\u0131m ve kodlama m\u00fckemmeliyetini odak alan uygulamalar olu\u015fturma deneyimine sahip, profesyonel olarak 15+ y\u0131l \u00fczeri deneyime sahip bir yaz\u0131l\u0131m m\u00fchendisi.","url":"https:\/\/fatihsoysal.com\/blog\/author\/fatihsoysal\/"}]}},"yoast_meta":{"yoast_wpseo_title":"","yoast_wpseo_metadesc":"","yoast_wpseo_canonical":""},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/fatihsoysal.com\/blog\/wp-json\/wp\/v2\/posts\/38968","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fatihsoysal.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fatihsoysal.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fatihsoysal.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fatihsoysal.com\/blog\/wp-json\/wp\/v2\/comments?post=38968"}],"version-history":[{"count":1,"href":"https:\/\/fatihsoysal.com\/blog\/wp-json\/wp\/v2\/posts\/38968\/revisions"}],"predecessor-version":[{"id":38969,"href":"https:\/\/fatihsoysal.com\/blog\/wp-json\/wp\/v2\/posts\/38968\/revisions\/38969"}],"wp:attachment":[{"href":"https:\/\/fatihsoysal.com\/blog\/wp-json\/wp\/v2\/media?parent=38968"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fatihsoysal.com\/blog\/wp-json\/wp\/v2\/categories?post=38968"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fatihsoysal.com\/blog\/wp-json\/wp\/v2\/tags?post=38968"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}