{"id":11420,"date":"2016-12-26T15:17:37","date_gmt":"2016-12-26T14:17:37","guid":{"rendered":"https:\/\/www.adventori.com\/fr\/?p=11420"},"modified":"2018-10-08T15:55:08","modified_gmt":"2018-10-08T13:55:08","slug":"adapter-la-taille-du-texte","status":"publish","type":"post","link":"https:\/\/v4.adventori.com\/fr\/enabler-html5-fr\/dynamisation-texte\/adapter-la-taille-du-texte\/","title":{"rendered":"Adapter la taille du Texte"},"content":{"rendered":"<a style=\"color: grey;\" href=\"\/?page_id=11761\">Documentation DCO Enabler -&gt; <\/a><a style=\"color: grey;\" href=\"https:\/\/v4.adventori.com\/fr\/enabler-html5-fr\/\">ENABLER HTML5 -&gt; <\/a><a style=\"color: grey;\" href=\"\/?p=11420\">Adapter la taille du Texte <\/a>\r\n<h3 style=\"text-align: center;\"><strong>ADAPTER LA TAILLE DU TEXTE<\/strong><\/h3><p>&nbsp;<\/p><p>Si vous voulez ins\u00e9rer du texte dynamique dans votre publicit\u00e9, mais que ce texte risque de prendre, dans certains cas, plus de place que l\u2019espace qui lui est r\u00e9serv\u00e9 dans sa div, vous pouvez utiliser l<span>a m\u00e9thode <\/span><code>adaptText.<\/code><strong><\/strong><\/p><p>La m\u00e9thode <code>adaptText<\/code> permet de r\u00e9duire la taille de la police sur un \u00e9l\u00e9ment donn\u00e9, \u201c10\u201c \u00e9tant la taille minimum accept\u00e9e.<\/p><h4><\/h4><p>Le facteur de r\u00e9duction permet d\u2019optimiser l\u2019affichage du texte et d\u2019adapter la taille de la police en fonction de l\u2019espace r\u00e9serv\u00e9 au champ texte.<\/p><h4><\/h4><p>Dans le cas o\u00f9 l\u2019ensemble du texte ne tient pas dans l\u2019emplacement qui lui est r\u00e9serv\u00e9 et que sa taille de police est de 15px, alors la m\u00e9thode r\u00e9duira cette derni\u00e8re jusqu\u2019\u00e0 10px.<\/p><h4><\/h4><p>Si le texte est toujours trop long suite \u00e0 la r\u00e9duction, les caract\u00e8res non affich\u00e9s seront r\u00e9sum\u00e9s par<strong> \u201c\u2026\u201c<\/strong><\/p><p>&nbsp;<\/p><div class=\"alert alert-danger\" role=\"alert\"><p><strong>Important : <\/strong>Pour ajuster correctement la taille du texte dans son espace d\u00e9di\u00e9, sp\u00e9cifiez les propri\u00e9t\u00e9s <strong>CSS<\/strong> suivantes \u00e0 votre \u00e9l\u00e9ment, exprim\u00e9es en pixels :<\/p><p><code>font-size \/<\/code> <code>line-height \/ width \/ height<\/code><\/p><\/div><p><strong>Pour ajuster la taille du texte d\u2019une div :<\/strong><\/p><iframe loading=\"lazy\" width=\"300\" height=\"400\" style=\"width: 100%;\" scrolling=\"no\" src=\"\/\/codepen.io\/adventori\/embed\/aOWoyv\/?height=400&#038;theme-id=14332&#038;default-tab=result\" frameborder=\"no\" allowtransparency=\"true\" allowfullscreen=\"allowfullscreen\">See the Pen <a href=\"http:\/\/codepen.io\/adventori\/pen\/aOWoyv\">Ajouter Enabler v2<\/a> by ADventori (<a href=\"http:\/\/codepen.io\/adventori\">@adventori<\/a>) on <a href=\"http:\/\/codepen.io\">CodePen<\/a>.\r\n<\/iframe><p>&nbsp;<\/p><p><strong>Pour ajuster la taille du texte d\u2019une class :<\/strong><\/p><pre>&lt;div class=\"wording\"&gt;<strong><br \/><\/strong><em>   &lt; Texte par d\u00e9faut &gt;<br \/><\/em>&lt;\/div&gt;<br \/>\r\n&lt;script type=\"text\/javascript\"&gt;\r\n   ADventori.Display.adaptText(document.getElementsByClassName('wording'), 10);\r\n&lt;\/script&gt;<\/pre><p>&nbsp;<\/p><p>Vous voulez dynamiser et adapter votre texte directement ? <strong>La m\u00e9thode setAndAdaptText est faite pour vous :<\/strong><\/p><iframe loading=\"lazy\" width=\"300\" height=\"400\" style=\"width: 100%;\" scrolling=\"no\" src=\"\/\/codepen.io\/adventori\/embed\/pJwbaJ\/?height=400&#038;theme-id=14332&#038;default-tab=result\" frameborder=\"no\" allowtransparency=\"true\" allowfullscreen=\"allowfullscreen\">See the Pen <a href=\"http:\/\/codepen.io\/adventori\/pen\/pJwbaJ\">Ajouter Enabler v2<\/a> by ADventori (<a href=\"http:\/\/codepen.io\/adventori\">@adventori<\/a>) on <a href=\"http:\/\/codepen.io\">CodePen<\/a>.\r\n<\/iframe><div class=\"content-block clearfix\"><p><strong>De la m\u00eame mani\u00e8re , vous pouvez appliquer cette fonctionnalit\u00e9 aux \u00e9l\u00e9ments d\u2019une class :<\/strong><\/p><pre>&lt;div class=\"wording\"&gt;<strong><br \/><\/strong><em>   &lt; Texte par d\u00e9faut &gt;<br \/><\/em>&lt;\/div&gt;<br \/>\r\n&lt;script type=\"text\/javascript\"&gt;\r\n   ADventori.Display.setAndAdaptText(document.getElementsByClassName('wording'),ADventori.data.wording, 10);\r\n&lt;\/script&gt;\r\n<\/pre>\r\n<\/div>\r\n\r\n<br \/><br \/>\r\n<div class=\"alert alert-danger\" role=\"alert\"><p><strong>Important : <\/strong>Pour utiliser les fonctions adaptText, le container cibl\u00e9 par cette fonction ne peut pas utiliser la propri\u00e9t\u00e9 CSS display:none (privil\u00e9giez opacity:0;visibility:hidden;).<\/p><\/div>\r\n\r\n<p>Vous pouvez \u00e9galement d\u00e9finir la taille de votre conteneur directement depuis la m\u00e9thode <strong>setAndAdaptText<\/strong><\/p>\r\n<pre>ADventori.Display.setAndAdaptText(document.getElementById('ADventori_text1'),ADventori.data.wording, 10,{<strong>width<\/strong>:270,<strong>height<\/strong>:160});\r\n<\/pre>\r\n\r\n<iframe loading=\"lazy\" width=\"300\" height=\"400\" style=\"width: 100%;\" scrolling=\"no\" src=\"\/\/codepen.io\/adventori\/embed\/GYNxpw\/?height=400&#038;theme-id=14332&#038;default-tab=result\" frameborder=\"no\" allowtransparency=\"true\" allowfullscreen=\"allowfullscreen\">See the Pen <a href=\"http:\/\/codepen.io\/adventori\/pen\/GYNxpw\">Ajouter Enabler v2<\/a> by ADventori (<a href=\"http:\/\/codepen.io\/adventori\">@adventori<\/a>) on <a href=\"http:\/\/codepen.io\">CodePen<\/a>.\r\n<\/iframe>","protected":false},"excerpt":{"rendered":"<p>Documentation DCO Enabler -&gt; ENABLER HTML5 -&gt; Adapter la taille du Texte ADAPTER LA TAILLE DU TEXTE&nbsp;Si vous voulez ins\u00e9rer du texte dynamique dans votre publicit\u00e9, mais que ce texte risque de prendre, dans certains cas, plus de place que l\u2019espace qui lui est r\u00e9serv\u00e9 dans sa div, vous pouvez utiliser la m\u00e9thode adaptText.La m\u00e9thode &hellip; <a href=\"https:\/\/v4.adventori.com\/fr\/enabler-html5-fr\/dynamisation-texte\/adapter-la-taille-du-texte\/\">Continued<\/a><\/p>\n","protected":false},"author":5,"featured_media":11799,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[235],"tags":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v19.0 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Adapter la taille du Texte | ADventori<\/title>\n<meta name=\"robots\" content=\"noindex, nofollow\" \/>\n<meta property=\"og:locale\" content=\"fr_FR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Adapter la taille du Texte | ADventori\" \/>\n<meta property=\"og:description\" content=\"Documentation DCO Enabler -&gt; ENABLER HTML5 -&gt; Adapter la taille du Texte ADAPTER LA TAILLE DU TEXTE&nbsp;Si vous voulez ins\u00e9rer du texte dynamique dans votre publicit\u00e9, mais que ce texte risque de prendre, dans certains cas, plus de place que l\u2019espace qui lui est r\u00e9serv\u00e9 dans sa div, vous pouvez utiliser la m\u00e9thode adaptText.La m\u00e9thode &hellip; Continued\" \/>\n<meta property=\"og:url\" content=\"https:\/\/v4.adventori.com\/fr\/enabler-html5-fr\/dynamisation-texte\/adapter-la-taille-du-texte\/\" \/>\n<meta property=\"og:site_name\" content=\"ADventori\" \/>\n<meta property=\"article:published_time\" content=\"2016-12-26T14:17:37+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2018-10-08T13:55:08+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/v4.adventori.com\/media\/ADventori-AdaptTextSize.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"540\" \/>\n\t<meta property=\"og:image:height\" content=\"410\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"twitter:card\" content=\"summary\" \/>\n<meta name=\"twitter:creator\" content=\"@adventori\" \/>\n<meta name=\"twitter:site\" content=\"@adventori\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Fabien Delaforge\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https:\/\/v4.adventori.com\/#organization\",\"name\":\"ADventori\",\"url\":\"https:\/\/v4.adventori.com\/\",\"sameAs\":[\"https:\/\/twitter.com\/adventori\"],\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"fr-FR\",\"@id\":\"https:\/\/v4.adventori.com\/#\/schema\/logo\/image\/\",\"url\":\"\/media\/Large_Logo-ADventori_Couleur_2015.png\",\"contentUrl\":\"\/media\/Large_Logo-ADventori_Couleur_2015.png\",\"width\":400,\"height\":133,\"caption\":\"ADventori\"},\"image\":{\"@id\":\"https:\/\/v4.adventori.com\/#\/schema\/logo\/image\/\"}},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/v4.adventori.com\/#website\",\"url\":\"https:\/\/v4.adventori.com\/\",\"name\":\"ADventori\",\"description\":\"LESS ADS, MORE EFFICIENT ADS\",\"publisher\":{\"@id\":\"https:\/\/v4.adventori.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/v4.adventori.com\/search\/{search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"fr-FR\"},{\"@type\":\"ImageObject\",\"inLanguage\":\"fr-FR\",\"@id\":\"https:\/\/v4.adventori.com\/fr\/enabler-html5-fr\/dynamisation-texte\/adapter-la-taille-du-texte\/#primaryimage\",\"url\":\"https:\/\/v4.adventori.com\/media\/ADventori-AdaptTextSize.jpg\",\"contentUrl\":\"https:\/\/v4.adventori.com\/media\/ADventori-AdaptTextSize.jpg\",\"width\":540,\"height\":410},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/v4.adventori.com\/fr\/enabler-html5-fr\/dynamisation-texte\/adapter-la-taille-du-texte\/#webpage\",\"url\":\"https:\/\/v4.adventori.com\/fr\/enabler-html5-fr\/dynamisation-texte\/adapter-la-taille-du-texte\/\",\"name\":\"Adapter la taille du Texte | ADventori\",\"isPartOf\":{\"@id\":\"https:\/\/v4.adventori.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/v4.adventori.com\/fr\/enabler-html5-fr\/dynamisation-texte\/adapter-la-taille-du-texte\/#primaryimage\"},\"datePublished\":\"2016-12-26T14:17:37+00:00\",\"dateModified\":\"2018-10-08T13:55:08+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/v4.adventori.com\/fr\/enabler-html5-fr\/dynamisation-texte\/adapter-la-taille-du-texte\/#breadcrumb\"},\"inLanguage\":\"fr-FR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/v4.adventori.com\/fr\/enabler-html5-fr\/dynamisation-texte\/adapter-la-taille-du-texte\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/v4.adventori.com\/fr\/enabler-html5-fr\/dynamisation-texte\/adapter-la-taille-du-texte\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/v4.adventori.com\/fr\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Adapter la taille du Texte\"}]},{\"@type\":\"Article\",\"@id\":\"https:\/\/v4.adventori.com\/fr\/enabler-html5-fr\/dynamisation-texte\/adapter-la-taille-du-texte\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/v4.adventori.com\/fr\/enabler-html5-fr\/dynamisation-texte\/adapter-la-taille-du-texte\/#webpage\"},\"author\":{\"@id\":\"https:\/\/v4.adventori.com\/#\/schema\/person\/51ce5bf64eb63421fe56ce7c73e096ec\"},\"headline\":\"Adapter la taille du Texte\",\"datePublished\":\"2016-12-26T14:17:37+00:00\",\"dateModified\":\"2018-10-08T13:55:08+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/v4.adventori.com\/fr\/enabler-html5-fr\/dynamisation-texte\/adapter-la-taille-du-texte\/#webpage\"},\"wordCount\":338,\"publisher\":{\"@id\":\"https:\/\/v4.adventori.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/v4.adventori.com\/fr\/enabler-html5-fr\/dynamisation-texte\/adapter-la-taille-du-texte\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/v4.adventori.com\/media\/ADventori-AdaptTextSize.jpg\",\"articleSection\":[\"Dynamisation du Texte\"],\"inLanguage\":\"fr-FR\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/v4.adventori.com\/#\/schema\/person\/51ce5bf64eb63421fe56ce7c73e096ec\",\"name\":\"Fabien Delaforge\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Adapter la taille du Texte | ADventori","robots":{"index":"noindex","follow":"nofollow"},"og_locale":"fr_FR","og_type":"article","og_title":"Adapter la taille du Texte | ADventori","og_description":"Documentation DCO Enabler -&gt; ENABLER HTML5 -&gt; Adapter la taille du Texte ADAPTER LA TAILLE DU TEXTE&nbsp;Si vous voulez ins\u00e9rer du texte dynamique dans votre publicit\u00e9, mais que ce texte risque de prendre, dans certains cas, plus de place que l\u2019espace qui lui est r\u00e9serv\u00e9 dans sa div, vous pouvez utiliser la m\u00e9thode adaptText.La m\u00e9thode &hellip; Continued","og_url":"https:\/\/v4.adventori.com\/fr\/enabler-html5-fr\/dynamisation-texte\/adapter-la-taille-du-texte\/","og_site_name":"ADventori","article_published_time":"2016-12-26T14:17:37+00:00","article_modified_time":"2018-10-08T13:55:08+00:00","og_image":[{"width":540,"height":410,"url":"https:\/\/v4.adventori.com\/media\/ADventori-AdaptTextSize.jpg","type":"image\/jpeg"}],"twitter_card":"summary","twitter_creator":"@adventori","twitter_site":"@adventori","twitter_misc":{"Written by":"Fabien Delaforge","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Organization","@id":"https:\/\/v4.adventori.com\/#organization","name":"ADventori","url":"https:\/\/v4.adventori.com\/","sameAs":["https:\/\/twitter.com\/adventori"],"logo":{"@type":"ImageObject","inLanguage":"fr-FR","@id":"https:\/\/v4.adventori.com\/#\/schema\/logo\/image\/","url":"\/media\/Large_Logo-ADventori_Couleur_2015.png","contentUrl":"\/media\/Large_Logo-ADventori_Couleur_2015.png","width":400,"height":133,"caption":"ADventori"},"image":{"@id":"https:\/\/v4.adventori.com\/#\/schema\/logo\/image\/"}},{"@type":"WebSite","@id":"https:\/\/v4.adventori.com\/#website","url":"https:\/\/v4.adventori.com\/","name":"ADventori","description":"LESS ADS, MORE EFFICIENT ADS","publisher":{"@id":"https:\/\/v4.adventori.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/v4.adventori.com\/search\/{search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"fr-FR"},{"@type":"ImageObject","inLanguage":"fr-FR","@id":"https:\/\/v4.adventori.com\/fr\/enabler-html5-fr\/dynamisation-texte\/adapter-la-taille-du-texte\/#primaryimage","url":"https:\/\/v4.adventori.com\/media\/ADventori-AdaptTextSize.jpg","contentUrl":"https:\/\/v4.adventori.com\/media\/ADventori-AdaptTextSize.jpg","width":540,"height":410},{"@type":"WebPage","@id":"https:\/\/v4.adventori.com\/fr\/enabler-html5-fr\/dynamisation-texte\/adapter-la-taille-du-texte\/#webpage","url":"https:\/\/v4.adventori.com\/fr\/enabler-html5-fr\/dynamisation-texte\/adapter-la-taille-du-texte\/","name":"Adapter la taille du Texte | ADventori","isPartOf":{"@id":"https:\/\/v4.adventori.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/v4.adventori.com\/fr\/enabler-html5-fr\/dynamisation-texte\/adapter-la-taille-du-texte\/#primaryimage"},"datePublished":"2016-12-26T14:17:37+00:00","dateModified":"2018-10-08T13:55:08+00:00","breadcrumb":{"@id":"https:\/\/v4.adventori.com\/fr\/enabler-html5-fr\/dynamisation-texte\/adapter-la-taille-du-texte\/#breadcrumb"},"inLanguage":"fr-FR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/v4.adventori.com\/fr\/enabler-html5-fr\/dynamisation-texte\/adapter-la-taille-du-texte\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/v4.adventori.com\/fr\/enabler-html5-fr\/dynamisation-texte\/adapter-la-taille-du-texte\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/v4.adventori.com\/fr\/"},{"@type":"ListItem","position":2,"name":"Adapter la taille du Texte"}]},{"@type":"Article","@id":"https:\/\/v4.adventori.com\/fr\/enabler-html5-fr\/dynamisation-texte\/adapter-la-taille-du-texte\/#article","isPartOf":{"@id":"https:\/\/v4.adventori.com\/fr\/enabler-html5-fr\/dynamisation-texte\/adapter-la-taille-du-texte\/#webpage"},"author":{"@id":"https:\/\/v4.adventori.com\/#\/schema\/person\/51ce5bf64eb63421fe56ce7c73e096ec"},"headline":"Adapter la taille du Texte","datePublished":"2016-12-26T14:17:37+00:00","dateModified":"2018-10-08T13:55:08+00:00","mainEntityOfPage":{"@id":"https:\/\/v4.adventori.com\/fr\/enabler-html5-fr\/dynamisation-texte\/adapter-la-taille-du-texte\/#webpage"},"wordCount":338,"publisher":{"@id":"https:\/\/v4.adventori.com\/#organization"},"image":{"@id":"https:\/\/v4.adventori.com\/fr\/enabler-html5-fr\/dynamisation-texte\/adapter-la-taille-du-texte\/#primaryimage"},"thumbnailUrl":"https:\/\/v4.adventori.com\/media\/ADventori-AdaptTextSize.jpg","articleSection":["Dynamisation du Texte"],"inLanguage":"fr-FR"},{"@type":"Person","@id":"https:\/\/v4.adventori.com\/#\/schema\/person\/51ce5bf64eb63421fe56ce7c73e096ec","name":"Fabien Delaforge"}]}},"_links":{"self":[{"href":"https:\/\/v4.adventori.com\/fr\/wp-json\/wp\/v2\/posts\/11420"}],"collection":[{"href":"https:\/\/v4.adventori.com\/fr\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/v4.adventori.com\/fr\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/v4.adventori.com\/fr\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/v4.adventori.com\/fr\/wp-json\/wp\/v2\/comments?post=11420"}],"version-history":[{"count":7,"href":"https:\/\/v4.adventori.com\/fr\/wp-json\/wp\/v2\/posts\/11420\/revisions"}],"predecessor-version":[{"id":23102,"href":"https:\/\/v4.adventori.com\/fr\/wp-json\/wp\/v2\/posts\/11420\/revisions\/23102"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/v4.adventori.com\/fr\/wp-json\/wp\/v2\/media\/11799"}],"wp:attachment":[{"href":"https:\/\/v4.adventori.com\/fr\/wp-json\/wp\/v2\/media?parent=11420"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/v4.adventori.com\/fr\/wp-json\/wp\/v2\/categories?post=11420"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/v4.adventori.com\/fr\/wp-json\/wp\/v2\/tags?post=11420"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}